Forums

Custom form read only if user submit answer

vlachos.v 08 Jun, 2017
Hi,
i have a form with custom code (just a table with input texts) and i want to make all form read only after first submit.
If i edit the form and put in <fieldset disabled>custom_form_code</fieldset> all is done perfect, but how edit dynamically the form code on load if user has submit answer?
GreyHead 08 Jun, 2017
Hi vlachos.v,

You can check if there is a saved record, and if there is then show the data in a read-only form. Unfortunately you can't set read-only using CSS (you could using JavaScript) so the simplest way might be to have two forms - or form pages - one with the readonly attribute set and the other without.

Bob
vlachos.v 08 Jun, 2017
Is there an easy way to disable all input items with js?
This topic is locked and no more replies can be posted.