Problem When edit with validation

QuestionsProblem When edit with validation
Sergio Pulido asked 6 months ago


When I add a record, valid the order by ajax, to see if it already exists, the problem is that when editing, it also does the validation, and remains blocked in that field, because it already exists!
Can I turn off in edit mode?
$ col [“editoptions”] = array (“onblur” => “validate_onblur (this)”);

Greetings, Sergio Pulido.

2 Answers
Abu Ghufran Staff answered 6 months ago

I’ll be updating back after working.

Abu Ghufran - Dev Team
PHP Grid Framework
Abu Ghufran Staff answered 4 months ago


Your ticket somehow got unanswered.

Solution for your case is to identify if the dialog is add or edit. If it is edit you can skip the ajax call.

To check the operation, you can verify the value of first column (PK or ID) using jquery selector. It will be empty for add and will have data for edit dialog.





if ( $(“[name=product_id].FormElement”).val() == “”)
// do ajax validation otherwise not.

Abu Ghufran - Dev Team
PHP Grid Framework
Your Answer

14 + 7 =

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 / 5. Vote count:

As you found this post useful...

Follow us on social media!

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

Let us improve this post!