I have an editable field on a website that needs to be editable so the users can see what they’ve selected from an address book that populates the field. Problem is, I only want them to select from the address book, and not type any data in. Is there something I could do on the onClick event of the field or something else to prevent editing to occur? I don’t want to make the field computed, because then they can’t see what they selected in edit mode.
Why does the field have to be editable? I don’t see it. Just style the text so that the meaning is clear to users. A computed for display field or even computed text would do just fine.
If you go with a field, the form property Generate HTML for all fields will automatically create a hidden input of the same name and value as the original field. Actually, the description of this flag is a little misleading, as it applies to computed fields as well.
If you go with computed text, you can still generate your own hidden input in pass-through HTML. In general, I prefer this approach because it does not unnecessarily create hidden inputs for just each and every hidden or computed field.