Thursday, November 30, 2017

How do I customize registration form HTML?

The HTML for the user registration form looks like this:
<form method="post">
 {% csrf_token %}
 {{ registration_form.as_p }}
 <button type="submit">Register</button>

I understand that the `registration_form.as_p` line automatically gives me the form's HTML. But I'd like to customize that HTML. For instance, I'd like the label text to be placeholders instead. How do I do this?

If it helps, `registration_form` is `UserCreationForm()`

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment