I'm working on a site using Chronoforms 3 and I've got a couple of basic server-side validations.
When I purposely give a wrong answer to the question the server-side validation does pick it up as normal. The result is in the attached image.
That all works fine. But what I'm trying to do is to get that message "Sorry, but you need to answer the math question correctly." into the red box above it.
The code for the box is.
I've looked through the files and not finding out where the code is that generates the error messages, so I can modify it and have the error message in that cf_alert box.
I thought it might have been in chronocontact.html.php
But that didn't work. Any direction would be appreciated.
When I purposely give a wrong answer to the question the server-side validation does pick it up as normal. The result is in the attached image.
That all works fine. But what I'm trying to do is to get that message "Sorry, but you need to answer the math question correctly." into the red box above it.
The code for the box is.
<span class="cf_alert"></span>
I've looked through the files and not finding out where the code is that generates the error messages, so I can modify it and have the error message in that cf_alert box.
I thought it might have been in chronocontact.html.php
<span class="cf_alert"><?php echo '<ol>'.$MyForm->formerrors.'</ol>'; ?></span>
But that didn't work. Any direction would be appreciated.
Hi pcpros2go,
I'm not sure how you are doing the validation? if you use the SeverSide validation box then the syntax is
If you are doing this and the message is misplaced then it's probably a CSS problem.
Bob
I'm not sure how you are doing the validation? if you use the SeverSide validation box then the syntax is
<?php
if($_POST['accept_terms'] != 'yes')
return 'Sorry, but you need to accept our terms to proceed';
?>
and this will automatically set the error message. If you are doing this and the message is misplaced then it's probably a CSS problem.
Bob
This topic is locked and no more replies can be posted.