View Full Version : Validations Pass message not showing
elove341397
05-19-2009, 03:19 PM
All of my validations work except the message that is suppose to appear when all of my validations pass. After the form is submitted successfully I want a message to appear that says 'Thank you, your information was sent.'
This doesn't work. I first selected if ANY validations passed. After this didn't work, I individually selected all the required fields and it still didn't work.
Any suggestions?
Ray Borduin
05-19-2009, 05:11 PM
It won't work. Do you have securityAssist? You could add a rule pretty easily.
Validation toolkit can't be used to show any messages if the form submits successfully.
Instead you should add a url parameter to a redirect after a successful form submit. Then use that url parameter to show the success message. If you aren't using a redirect you can use :
<?php if (isset($_POST)) { ?>
around the error message. Since the only way a post would go through is after a successful validation. SecurityAssist comes with a show conditional region you can use to create the if statement for you, so you wouldn't have to write the code, that is why I asked.
elove341397
05-19-2009, 07:33 PM
Yes, I have security assist. I usually use the url parameter/if statement when I manually code validations. I just thought the purpose of the 'validations pass' section was to show messages when the validations were successful.
How do I use security assist create the if statement?
Ray Borduin
05-20-2009, 06:45 AM
Highlight the message and use the SecurityAssist->Show Region server behavior instead of the validation toolkit show if server behavior.
Then click on the rules manager and add a new rule.
Give it a Name: Validation Success
add one condition: Allow
value: <?php echo ((isset($_POST))?"1":""); ?>
Criteria: <>
Compare To:
leave compare to blank. This is for if you don't use a redirect on the page. If you do use a redirect, then add a parameter to the redirect like: pagename.php?success=true
and for the value of the rule use: <?php echo ((isset($_GET['success']))?"1":""); ?>
everything else would be the same.
Then click ok to get back to the original interface and you will be able to use that condition to show things on the page.
dan361748
08-24-2010, 07:50 AM
I wonder if anyone has had success with this.
I am also trying to figure out how to use Security Assist rules manager and Show If to pass validation on successful form submit.
I have created my rule value: <?php echo ((isset($_POST))?"1":""); ?> and set the Criteria to <>
I then applied this validation rule to my region as a Show Region
However it looks like the validation is always in a state of 'Pass'. My region appears even before the form is submitted.
Any assistance or clarification would be appreciated.
Ray Borduin
08-24-2010, 08:03 AM
Can you attach a copy of the page in question? It is hard to debug why something doesn't work from your description of the problem alone.
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.