|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
elyobelyob Smarty Rookie
Joined: 17 Sep 2007 Posts: 5
|
Posted: Wed Oct 03, 2007 10:52 am Post subject: SmartyV'date, radio button in one form, different checks.. |
|
|
EDIT : Actually, I solved this. Basically I altered the if statement for smarty validate
if(SmartyValidate::is_valid($_POST) || $_POST['address_type']=="choice1")
------------------
Hi, I have a form which gives a choice between entering an address or choosing an existing address ...
The "enter address" needs notEmpty checks, however if the user checks an existing address I want those checks disabled.
I have the if (empty($_POST)) check which registers the validators, however if I use smarty to {if $radiobuttonchecked} {validate} {/if} within the template, it automatically falls through if(SmartyValidate::is_valid($_POST)) check and goes to "redraw the form".
As the $_POST is empty at the start, then the register_validator is always done.
So, I guess I want to do a "if user has chosen a stored address, ignore the validate" .. any ideas?
Thanks |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|