Required when new record only

QuestionsRequired when new record only
Tim Moore asked 1 year 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 1 year ago


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

Line 34,35 and 136

Abu Ghufran - Dev Team
Grid 4 PHP Framework
Your Answer

3 + 4 =

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?