Friday, December 1, 2017

Re: How do I customize registration form HTML?

Hello,

I don't know if this tutorial will help you. It helped me a lot.


It is a very good serie teaching how to build a board.

Em quinta-feira, 30 de novembro de 2017 22:50:35 UTC-2, Tom Tanner escreveu:
The HTML for the user registration form looks like this:
<form method="post">
 {% csrf_token %}
 {{ registration_form.as_p }}
 <button type="submit">Register</button>
</form>

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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f351be5f-5e5d-46ed-b634-c31b02f3becd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment