disabling/enabling field entry in layouts
I am designing a layout to post payments and I read a parameter from a different table to indicate whether a receipt number can be entered or is assigned automatically. So I need to make the receipt number field accept entry or not depending on the case.
I can make two different layouts but it seems to be very inefficient programming to have have two different layouts for the sake of one field out of 20. This requirement will also be needed in other layouts but for more than one field. For example: receipt number as mentioned above as well as tax entry which depends on a different parameter.
Is there a smart way to achieve this.