Form validation one field dependent on another field

QuestionsForm validation one field dependent on another field
Mike Olson asked 1 year ago

Hello,

 

I have a form where I have two fields that are required if either one is given a value. They are not required on the form unless on or the other is given a value.

 

The fields on my attached form image are: Completed By, and Completed Date

 

Screenshot: https://imgur.com/vttYNv3

1 Answers
Abu Ghufran Staff answered 1 year ago

You can refer custom JS validation function: https://www.gridphp.com/docs/validation/#js-validation

Demo Code:

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

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

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

16 + 6 =

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?