Validation for a column when another has a value

QuestionsValidation for a column when another has a value
N Julián asked 10 years ago

I need to validate a column when another has a value X

I Have :

$col = array();
$col["title"] = "Asistencia Len";
$col["name"] = "asislen";
$col["edittype"] ="select";
$col["editoptions"] =array("value"=>'P:P;N:N;A:A');
$col["width"] = "2";
$col["editable"] = true;
$col["align"] = "center";
$cols[] = $col;

$col = array();
$col["title"] = "No Pertenece";
$col["name"] = "noPertenece";
$col["edittype"] ="select";
$col["editoptions"] =array("value"=>'Si:Si;No:No');
$col["width"] = "2";
$col["editable"] = true;
$col["align"] = "center";
$cols[] = $col;

I Need:
If noPertenece == 'Si' and asislen =='P'
Then Alert
Else
Nothing

I can do this?

5 Answers
Abu Ghufran answered 10 years ago

Please refer validate_form_once function in this demo.
http://www.phpgrid.org/demo/demos/editing/js-validation-form.phps

N Julián answered 10 years ago

Hi.

I understand that this can only be done with the paid version of this library

thanks for the help

Abu Ghufran answered 10 years ago

This is doable with free version too.
You can try adding line 80,81,131

N Julián answered 10 years ago

ohh!!! I try and i tell you, thanks so much

N Julián answered 10 years ago

Its Works, Thanks so much.

Your Answer

16 + 12 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?