multiple choice values read only

Basina Akash
Tera Contributor

I want to set one of the choice variable value to read only based on the another variable in client script

10 REPLIES 10

Hello @Basina Akash 

Please use below line of code: 

g_form.removeOption('fieldName', 'choiceValue');

Please Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.

 

Thanks & Regards,

Kartik Magadum

 

Hi @Basina Akash ,

 

What's the purpose of making it read only? If the user should not select that value then it's better to remove it. I don't think there is any way OOTB via which this can be achieved.

It can be done via DOM manipulation but that is not recommended.

Soy suggestion would be to go with removeOption

 

Thanks,

Danish

 

Basina Akash
Tera Contributor

Not to remove need to make read  only ..

 

 

Hello @Basina Akash 

Without using DOM manipulation it cannot be disabled. But that's a bad practice. 

 

Thanks!

Hello @Basina Akash 

Did you get a solution to your query by any chance? I have a similar requirement now. Out of 4 choices in a multiple choice field one of those fields should be selected by default and made readonly and then the user can select any one from the other 3. It would be helpful if u can share what helped you to achieve this.

 

Thanks,

Hema