The disabled form element is not submitted

后端 未结 3 1022
闹比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:53

    This worked like a charm for me. It prevents the element from being edited and will pass it through the post.

    $this->username->setAttrib('readonly', 'true');
    

提交回复
热议问题