Required when new record only

QuestionsRequired when new record only
Tim Moore asked 2 weeks ago

Is there a way to only require a field when adding a new record and not on edit?

 

$col[“show”] = array(“list”=>false, “add”=>true, “edit”=>false, “view”=>true, “bulkedit”=>false);
$col[“editrules”] = array(“required”=>false);
$cols[] = $col;

1 Answers
Abu Ghufran Staff answered 2 weeks ago

Hello,

You can skip this editrules option and use form level data validation as in this demo.

https://www.gridphp.com/demo/demos/editing/js-validation-form.phps

Line 34,35 and 136

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

9 + 7 =

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?