Adding readonly custom fields

Support forumAdding readonly custom fields
Erik Liljencrantz Staff asked 3 years ago
Using the plugin for logged in users with custom fields taken from user info like user_login and display_name - which works after some figuring.

For the display_name, it would be nice to show the field (i.e. Visible checked) but only to show the booking user who the booking is for, as a read only field.

Another check box (under Required and Visible) with a matching readonly flag in the wp_ea_meta_fields table - and logic to add "readonly" to the input field could accomplish this.
1 Answers
Erik Liljencrantz Staff answered 3 years ago
A workaround is to use Javascript (or jQuery) to set readonly true, included in this question/answer: