required field
i have two fields one is text and another is pathfield
if textfield is authored then paathfield should be required
if textfield is not authored then pathfield not required
can anyone help how to write js for this?
i have two fields one is text and another is pathfield
if textfield is authored then paathfield should be required
if textfield is not authored then pathfield not required
can anyone help how to write js for this?
Please follow below steps.
1. create a new clientlibs for dialog field validation
2. add this clientlib category in the dialog with property name "extraClientlibs"
3. add granite:data node for textfield and pathfield.
4. capture these fields using the CSS class name provided using granite:data node.
5. validate the dialog by capturing "on-change" event in dialog and check textfield in clientlib js.
Please refer below URL for dialog with extraclientlibs
https://www.albinsblog.com/2018/09/how-to-enable-custom-validation-on-multifield-touch-ui-aem.html
I hope it helps.
Thanks,
Rohit
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.