The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group

Slack Signup
Newsletter Optin
Help Desk

Prevent Read Only fields from being selected

Labels

This Discussion is public

Notifications

I have styled the colors for read-only fields so there is a white background & border so that the field doesn’t look like a field at all but regular text on the white page. However, if a user clicks the text, the field highlights as active (in this case, blue). Is there a way to specifically format read-only only fields so that the "active" field color style doesn't show (basically so you can’t tell it’s active at all) or better yet just make the read-only fields unselectable? I don’t want to format all of my active fields with a white border, just the read-only ones.

Thanks!

Hi James,

You have a couple of options.

To disable the field you need to add disabled="disabled" to the html.

You can do this in the "Customise HTML" part of your form by adding it to the [input] shortcode for your read only field. E.g. [input disabled="disabled"]

If you also want to stop users being able to select the text that is in that field you can add the "user-select: none;" CSS to the field too.

Hope that helps.

Chris

Thank you! this worked perfectly.

Discussion closed.