03-10-2014 08:22 PM
I would like to have validation for scenario below:
User must tick either 1 in order to save the vendor record, user cannot tick both or ignore it
Anyone can gv me the valid condition?
Thanks in advance
03-10-2014 11:55 PM
update/add : (not null (vendor in $file)) or (not null (manufacturer in $file))
validation : vendor in $file=1 and manufacturer in $file=1
Also can try for radio button by grouping them. See dep.g for logic used.
03-11-2014 12:31 AM - edited 03-11-2014 12:36 AM
I would say that it must be three separate lines as you need to get rid of the both boxes checked at the same time as well.
update/add : null(vendor in $file)
validation : manufacturer in $file=true
update/add : null(manufacturer in $file)
validation : vendor in $file=true
update/add : true
validation : null(vendor in $file) or null(manufacturer in $file)
If first field is empty then second field must be checked and vice versa.
03-12-2014 03:42 AM
You can use a radio button for this and make this as mandatory field and give these two radio buttons a value and while saving you can put a vlidation and check the radio button should have a value .
03-13-2014 10:46 AM