disabled field is not passed through - workaround needed

后端 未结 7 507
夕颜
夕颜 2020-12-10 03:29

I have a form with which I want to update a MyModel object. On the model there is a unique_together constraint, fieldA together with fieldB. In the form in the clean method

相关标签:
7条回答
  • 2020-12-10 04:05

    I used jQuery to solve the problem by removing disabled from all inputs before submitting.

    $('#my_form').submit(function(){
        $("#my_form :disabled").removeAttr('disabled');
    });
    

    Used answer from another SO answer

    0 讨论(0)
提交回复
热议问题