Is there a way to make a field read-only once a Lookup has found a match? For example, if the user types the Customer Id and the Lookup uses the ID to find the Customer Name, can the Customer Name field be set to read-only so the user has to use the value found in the Lookup?
Question
Question
Forms Lookup with read-only field
Answer
If users shouldn't be able to manually edit the Customer Name field, the easiest way is to make the Customer Name field read-only. The lookup rule will still be able to populate the field, but users won't be able to edit it.
If you need to handle the case where the customer doesn't have an ID number and must manually enter the customer name, you'd need to detect that and then make the Customer Name field editable. In that case you could use a checkbox that says "New Customer?" that, when selected, makes the Customer Name field editable.
Replies
Anyone needing help with setting a look up field to read-only so that the field is displayed in the final tiff or pdf should refer to this forum post: "Read Only" when you really want the data to be. Otherwise, simply setting a lookup field to readonly in the Form Designer will not display the field contents in the form sent to Laserfiche. It helped me!
Hi Jen,
I recommend using Javascript to change the field after certain conditions are met. Just test the fields and change the field write abilities after.
Good Luck