The disabled form element is not submitted

后端 未结 3 1009
闹比i
闹比i 2021-02-20 10:56

I needed to show some preexisting data from a table and but needed to disable them to prevent user from editing them. So i disabled them

$form -> getElement(\"e

3条回答
  •  故里飘歌
    2021-02-20 11:54

    I handle these type of scenarios using hidden elements. Add a hidden element with the same content that is there in your disabled element. When the form is posted, use the value from the hidden element.

    But be cautious that the use can modify the value of the hidden element using Firebug or other tools before submitting the form. Always check the form values again before processing.

提交回复
热议问题