Django: How do I make fields non-editable by default in an inline model formset? <p>I have an inline model formset, and I'd like to make fields non-editable if those fields already have values when the page is loaded. If the user clicks an "Edit" button on that row, it would become editable and (using JavaScript) I would replace the original widgets with editable ones. I'd like to do something like this when loading the page:</p> <pre><code>for field in form.fields: if field.value: # display as text else: # display as my standard editable widget for this field </code></pre> <p>I see that <code>inlineformset_factory</code> has an argument called <code>formfield_callback</code>. I suspect that this could be useful, but so for I haven't found any documentation for it. Can anyone point me to some useful documentation for this, and how it can help me solve this problem?</p>