I am trying to set the field to a certain value after the form is initialized.
For example, I have the following class.
class CustomForm(forms.Form)
in widget use 'value' attr. Example:
username = forms.CharField( required=False, widget=forms.TextInput(attrs={'readonly': True, 'value': 'CONSTANT_VALUE'}), )