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
Prevent Read Only fields from being selected
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!
July 31, 2018 at 2:58 am
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
August 1, 2018 at 4:28 pm
Thank you! this worked perfectly.
Discussion closed.