This topic is locked

check field value before submit

2/11/2011 11:03:13 PM
PHPRunner General questions
S
smith author

Hi

A table has some field like
id, present, excuse, representative, repname.
during inline edit and submit
the fields "present" and "representative" is a checkbox
if "present" is checked (Default) "excuse" can be blank, otherwise it has to be filled with some text

likewise if "representative" is unchecked (default) then "excuse" and "repname" can be blank otherwise both has to be filled.
what is the way to accomplish this?

S
smith author 2/13/2011

Nobody? It is all about dependent required field. make the field dynamically required or not!!!!!



Hi

A table has some field like
id, present, excuse, representative, repname.
during inline edit and submit
the fields "present" and "representative" is a checkbox
if "present" is checked (Default) "excuse" can be blank, otherwise it has to be filled with some text

likewise if "representative" is unchecked (default) then "excuse" and "repname" can be blank otherwise both has to be filled.
what is the way to accomplish this?

Sergey Kornilov admin 2/14/2011

You can make field required on the fly using Javascript API.
Check examples at http://xlinesoft.com/phprunner/docs/ctrl_addvalidation.htm