Set ‘Act on success’ to ‘Reload page’.
If the message has been sent then easiForm will set the variable
$easiMail_success and set to true.
If you want to use the variables set in the form then name would
become $f[‘name’], see example below:
<?php
if ($easiMail_success && $f['name']) { // If the form has been
submitted name has a value
echo 'Thank you ' . $f['name'] . ' for contacting us.';
}
?>
but… this might be used by making your form page a little more
dynamic, you can trick the form page by creating the thanks page then
making it load if the form is sent, but you do this a little
differently than you would normally, so…
1# Set the easiForm action to Reload on success.
2# Add this in the Before HTML markup of the * form * page (not thanks
page):
<?php
if ($easiMail_success) { // If the form has been submitted
$thanksTxt = 'Thank you ' . $f['name'] . ' for contacting us.';
// The following will include the thanks page if the form is sent,
after the thanks page
// has been loaded then script will exit so no more html is processed
and the form page
// with then not load so you will just see the thanks page.
include_once('./thanks.php'); // Name of the thanks page here
exit;
}
?>
3# Now on the * thanks * page add a markup item somewhere and paste
this code into it:
<?php
echo $thanksTxt;
?>
Make sure you put a space before and after the * actual markup item *
in step 3, then select the markup item and the spaces each side,
select a style as if styling some text (This will style the text
printed by php).
Now when the form is sent and all is well the thanks page will load
and stop the rest of the form page from loading, so you get the thanks
page when the URL is for the form page. You will see what I mean when
you do this.
Mike
On Mar 21, 2008, at 7:13 PM, shybuckstudio wrote:
Mike, I’ve read the ways in which I can apply your code to have
people’s names inserted on to the thank you page with easiform. I am
not versed in code at all , just follow instructions like a
monkey…so I have the following question…
How do I get to the config file to add: $ACTSUCCESS = 0;.
After that I think I just insert the following code
<?php
$s_m = 'Thanks ' . $f['first_name'] . ' ' . $f['surname'] . ', your
message has been sent to us. The e-mail address you used was: ' . $f
[email];
echo $s_m;
?>
into a Markup item.
I really don’t know how to change any of the above code to suite my
needs so I’ll tell you what they are:
have the code just insert the first name of the person filling out
the code.
My name field just has “name” on it.
thanks so much in advance showing me the way!
actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options