|
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 |
phpinside Smarty Rookie
Joined: 15 Apr 2006 Posts: 9
|
Posted: Mon Jun 05, 2006 10:56 am Post subject: SmartyValidate problem |
|
|
Hi All,
I have 2 text fields which are required to be filled,
and below that drop down menu
---------------
<select name="sts">
<option value="0">none</option>
<option value="1">avaiable</option>
</select>
<input type="text" name="name" />
------------------
so, How I Can validate "name" field if "sts" field passed with 1 value,
but if it's equal to 0, it does not need to be required.
Can anybody help? |
|
Back to top |
|
conrad10781 Smarty n00b
Joined: 24 Jun 2006 Posts: 4
|
Posted: Sat Jun 24, 2006 10:04 pm Post subject: Re: SmartyValidate problem |
|
|
phpinside wrote: | Hi All,
I have 2 text fields which are required to be filled,
and below that drop down menu
---------------
<select name="sts">
<option value="0">none</option>
<option value="1">avaiable</option>
</select>
<input type="text" name="name" />
------------------
so, How I Can validate "name" field if "sts" field passed with 1 value,
but if it's equal to 0, it does not need to be required.
Can anybody help? |
If this is still a issue I would probably do something like this
<option value=""> Select Below
or you can just leave it blank and someone might know to drop down, and you can validate with notEmpty since by default it would be "" |
|
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
|