my forms.py look like this
class UserRegistration(UserCreationForm):
def __int__(self, *args, **kwargs):
super(UserRegistration, self).__init__(*args, **kwargs)
self.helper = FormHelper()
self.helper.form_id = 'id-registrationForm'
self.helper.form_class = 'u-form--modern'
self.helper.form_method = 'post'
self.helper.form_action = 'submit_form'
self.helper.add_input(Submit('submit', 'Submit'))
class Meta:
model = User
fields = ['first_name',
'username',
'last_name',
'email',
'password1',
'password2']
and my templates look like this( i display only 1 field cuz they are more or less similar)
<form class="js-validate mt-5" id="id-registrationForm" method="post">
<div class="js-form-message mb-4">
<label class="h6 small d-block text-uppercase "> Email address</label>
<div class="js-focus-state input-group u-form">
<input type="email" class="form-control u-form__input" name="email"
placeholder="your@email.com">
</div>
</div>
Unfortunately my front-end skills are close to 0 and I could not really find out how to use my {{ form.email }} inside of a bootstrap's premade form. I need this to submit my modelForm and register a user.
Just to make it clear, i want my django form look like the one on the bottom