Okay, not much luck with the standard/inline confirmation method so far, but this may be a suitable alternative for you.. still keeps the basic effect from the first example too.
You'll need to change the form confirmation setting to redirect to the same page your forms are on and then set up a querystring parameter and unique value for each form.. I used "confirm" as the parameter in my example but it's totally up to you what to use.
confirmation settings
Now, I went created a new page template for the form to reside on, and included a simple php switch/case statement based on the query string. That way, you can show different messages based on which form was submitted if you'd like.
<?php
//show different confirmation messages based on the querystring value
$formconfirm = $_GET['confirm'];
switch ($formconfirm)
{
case form1:
echo "<div id=\"gforms_confirmation_message\">Thanks for submitting the first form. We'll be back in touch with you soon.</div>";
break;
case form2:
echo "<div id=\"gforms_confirmation_message\">Thanks for submitting the second form. We'll be back in touch with you soon.</div>";
break;
case form2:
echo "<div id=\"gforms_confirmation_message\">Thanks for submitting the third form. We'll be back in touch with you soon.</div>";
break;
}
?>
you can download my sample page template if you'd like to see the whole thing put together.
Once that's done, you can submit the form, it should redirect back to the form page passing the variable and the php will return the correct confirmation message. The jQuery effect from the first example is still there and works like a charm.
It's a little nicer when you see it in action, so again, here's a quick video screencast
One last note, I would make sure to place the php statement in the markup OUTSIDE of the tabbed content, or else you'll be back to the other issue where it's hidden by the tab visibility.
Posted 14 years ago on Tuesday December 1, 2009 |
Permalink