You are viewing limited content. For full access, please sign in.

Question

Question

disable field using JavaScript

asked on July 1, 2024

Hello, 

Does some one happen to know how can I convert the following code to modern form JavaScript?

"$('#q130 div input:radio').attr('disabled','disabled');"

 

Thank you for helping.

0 0

Answer

SELECTED ANSWER
replied on July 1, 2024

You can use this: LFForm.disableFields({fieldId: 1})

Replace the fieldID with the ID on your form.

2 0
replied on July 5, 2024

Thank you.

0 0

Replies

replied on July 1, 2024

Field Rules in the new designer allow you to disable a field.  No JS required

0 0
replied on July 1, 2024

I need to do this because if I disable it using field rules my other JavaScript related to that field will not work. 

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.