[Answer]-'exclude' but don't ignore result?

1👍

Something like this should work:

def __init__(self, *args, **kwargs):
    hidden_widget = forms.HiddenInput()
    self.fields['hidden_field'] = forms.CharField(widget=hidden_widget)

0👍

It’s not in the offical docs , If I remember correctly but this should work.
Render both fields as hidden:

{{ form.field_name.as_hidden }}

You could also set it’s widget to a hidden field (HidenInput): https://docs.djangoproject.com/en/dev/ref/forms/widgets/

Leave a comment