Hey Jackson,
Sure! There's actually a handy Form Tools Core function for this. You can call it in either of these ways:
The first way returns the number of submissions in the form - the second, the number of submissions in a form View.
In both cases, you'll need to pass the specific form ID and form View ID that you're interested in. You can use this core right in the Submission Pre-Parser rule.
Excellent question. Yes! There's a couple of ways. If you have a POST form, you can always include a hidden field:
If that value is defined, the form will redirect to that URL and not the "redirect URL" value stored for the form. Basically it just lets you override the default value.
Simililarly, you can also set that value in your Submission Pre-Parser rule to dynamically determine the redirect URL:
To be perfectly honest, I haven't tried this in a while - but that was how I originally coded it and I don't think anything's changed.
Anyway, let me know if you have any problems with the above or have any other questions!
- Ben
(Dec 13th, 2010, 7:31 PM)jacksonc@ust.hk Wrote: I'm still wondering how to "find out how many submissions have added so far", is there a var I can get this value?
Sure! There's actually a handy Form Tools Core function for this. You can call it in either of these ways:
PHP Code:
$num_submissions = ft_get_submission_count($form_id);
$num_view_submissions = ft_get_submission_count($form_id, $view_id);
The first way returns the number of submissions in the form - the second, the number of submissions in a form View.
In both cases, you'll need to pass the specific form ID and form View ID that you're interested in. You can use this core right in the Submission Pre-Parser rule.
Quote:is there any way to "play" with the redirected page? (Thank you page), possible to redirects to different return message?
Excellent question. Yes! There's a couple of ways. If you have a POST form, you can always include a hidden field:
Code:
<input type="hidden" name="form_tools_redirect_url" value="http://www.whatever.com" />
If that value is defined, the form will redirect to that URL and not the "redirect URL" value stored for the form. Basically it just lets you override the default value.
Simililarly, you can also set that value in your Submission Pre-Parser rule to dynamically determine the redirect URL:
PHP Code:
$_POST["form_tools_redirect_url"] = "http://whatever.com";
To be perfectly honest, I haven't tried this in a while - but that was how I originally coded it and I don't think anything's changed.
Anyway, let me know if you have any problems with the above or have any other questions!
- Ben