Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Client script on dependent field

Rohit54
Mega Guru

Hi all,

Can we write onChange client script for dependent. I basically have a form in which there are two fields 'categories' and 'subcategory'. The subcategory field depends upon category. The choices in subcategory depends upon what choice had been made in category. Now I have some choices in subcategory which I need to show for more than one category. For ex- I want choices 'A' and 'B' to show in subcategory for category '1', '2' , '3'.

I have written a onChange client script for it to add choices to subcategory when required category are there using g_form.addOption. But it is not working. However when I changed the field instead of sub category it worked. I think the issue with dependent field. 

Anyone can help or suggest on this. Thanks in advance.

 

1 REPLY 1

Onkar Pandav
Tera Guru