Hi, just me again with yet another question.
How can I have a form be submitted (normal submit) but not redirect to another page, just stay on the same page, and maybe pop up a little message, like "thank you for that information, please continue on below". Can that be done? The message isn't even as important as they stay on the same page, because I can make the submit button say "submit and continue below" or something like that. Hopefully this is an easy one!
Thanks!! Cheryl
How can I have a form be submitted (normal submit) but not redirect to another page, just stay on the same page, and maybe pop up a little message, like "thank you for that information, please continue on below". Can that be done? The message isn't even as important as they stay on the same page, because I can make the submit button say "submit and continue below" or something like that. Hopefully this is an easy one!
Thanks!! Cheryl
Hi Cheryl,
Up to CF v2.5 you can use:
to return to your form. (This is the code that ChronoForms uses on a failed ImageValidation.)
By including some kind of indicator or flag field in $_POST you can tell your form html to show a message (or indeed a completely different form) on the next showing.
Bob
Up to CF v2.5 you can use:
<?php
showform($_POST);
$error_found = true;
?>
to return to your form. (This is the code that ChronoForms uses on a failed ImageValidation.)
By including some kind of indicator or flag field in $_POST you can tell your form html to show a message (or indeed a completely different form) on the next showing.
Bob
Thank you Bob,
I added that to on submit (after email) and it seems to be working!
I just added a little php ehco statement to put the message. here is the code I put into the onsubmit after email
The first to keep them on the same page, the second to add a little text after they click submit, so they know it went through.
Cheryl
I added that to on submit (after email) and it seems to be working!
I just added a little php ehco statement to put the message. here is the code I put into the onsubmit after email
<?php
showform($_POST);
$error_found = true;
?>
<?php echo "Thank you<br>You may continue with payment below"; ?>
The first to keep them on the same page, the second to add a little text after they click submit, so they know it went through.
Cheryl
Hi Cheryl,
Ifyou just want a simple text message then you can use the Joomla 1.5 messaging code:
If you want something embedded in your form then put a placeholder field in your form html, give $_POST['message'] a value in the OnSubmit after code and use an 'if' clause to show it.
Bob
Ifyou just want a simple text message then you can use the Joomla 1.5 messaging code:
<?php
global $mainframe;
$mainframe->enqueuemessage('Happy August');
?>
If you want something embedded in your form then put a placeholder field in your form html, give $_POST['message'] a value in the OnSubmit after code and use an 'if' clause to show it.
<input type='hidden' name='message' value='' />
<?php
if ( $_POST['message'] != '' ) {
echo 'Here's the message';
}
?>
Bob
This topic is locked and no more replies can be posted.