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

Question

Question

Modern Layout Forms: Set field read-only or not, in table row with radio button

asked on September 29 Show version history

I have a table with a Radio Button group. Once of the radio button options is called "Change", which will allow a user to change some values for that row. I would like to have all fields in every row "read only" until a user selects the "Change" option for a row; after choosing that option, specific fields in that row should have the read-only option turned off so they can edit those specific fields.

I'm hoping someone has some sample javascript that will update a field so it is editable for only the row that contains the value "Change" in the radio button group.

 

0 0

Answer

SELECTED ANSWER
replied on October 1

You should be able to do this with Field Rules rather than Javascript.  Rather than setting your fields to Read-Only, leave them editable, but set a Field Rule that disables the fields if the radio button is not set to Change.

This is one of the benefits of the Layout Designer over the Classic Designer - Fields Rules are significantly more powerful and can be used for a lot of the stuff we traditionally used Javascript to accomplish in the Classic Designer.

1 0

Replies

replied on October 1

Thanks Matthew! That works perfectly and I wish I had explored the field rules before putting this question out!

 

 

0 0
replied on October 1

It is definitely a mentality shift going from the Classic Designer where we relied on Javascript for anything complicated to the Layout Designer where so many of our common tasks are built-in now.  Have a great day!

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

Sign in to reply to this post.