21
Let’s say I have a form with fields 1 to 7.
Something like:
field-1
field-2
field-3
field-4
field-5
field-6
field-7
All these fields are in one form.
With Laravel, sometimes I experienced situations when I disabled a field with the property disabled
, i have not been able to retrieve it through the array Input
. So, to directly avoid this problem I would like to know if there is, and if there is, like, a way to block, via JS/jQuery, that a field is edited in the form. HOWEVER, I will only know this (whether it should be disabled or not) at runtime.
Ex.: According to field value field-2
i may need to disable the fields field-3
, field-4
and field-5
for editing, but I will still need its values in the INPUT array, which will be assigned to have the same value as the field-2
, in that case.
I do not know if I could be clear, but any doubt ask in the comments!
Excellent reply. Thank you very much!
– Dennis Braga
But it is important to note that if the user has basic knowledge of Javascript using the browser console the user can change its field and send with the Form.
– Paulo Roberto Rosa