Let's say I have a form with fields from 1 to 7.
Something like:
field-1
field-2
field-3
field-4
field-5
field-6
field-7
All of these fields are on a form.
With Laravel, sometimes I experienced situations when I disabled a field with the disabled
property, I was not able to retrieve it through the Input
array. So, to directly avoid this problem I would like to know if there is, and if there is, how, a way to block, via JS / jQuery, that a field be edited in the form. BUT, I will only know this (whether it should be disabled or not) at runtime.
Ex: According to the value of the field-2
field I may need to disable the field-3
, field-4
and field-5
fields for editing, but I will still need their values in the INPUT array, which will be assigned to have the same value as field-2
, in that case.
I do not know if I can be clear, but any questions ask in the comments!