Login

Snippet by roam

Snippet List

Form field with fixed value

In case you need a form field that only has one acceptable value, you can create a custom form field derived from `forms.ChoiceField` which only accepts one choice. Alternatively you can: * Ignore the value of such a field entirely. * Simply pass a single choice to a the `forms.ChoiceField`

  • forms
  • field
Read More