How to make fields read-only on update

I have a form. When the form is complete, I don't want the user to change anything on the form.

But the user can see the values. The value of all fields is not editable. I can do this using an instance method, but that doesn't help with foreignkey.

+1


a source to share


2 answers


you can use readonlyAdmin



-1


a source


Depends on what you mean "after filling out the form".

If this post is in html form, just render a new html page with plain text and values ​​of the submitted form.



If the post-back was an ajax call, you can change the CSS style of the elements, for example and disable the submit button or erase the integer and replace the values ​​returned by the ajax request.

There is no "editable = False" property for btw html input elements.

0


a source







All Articles