Registration form in template

59 views
Skip to first unread message

Simon Connah

unread,
Mar 18, 2024, 12:15:19 AM3/18/24
to django...@googlegroups.com
I have a register user template with a form which works well but I have a problem where there is lots of other text next to the form elements such as password length and what characters need to go in a password. Is their a reasonable way to hide that text or do I need to do it with JavaScript?

Thank you.

Simon.
signature.asc

Clive Bruton

unread,
Mar 19, 2024, 11:50:56 AM3/19/24
to django...@googlegroups.com
If you want to override what the form is showing, then you can build
your own template and only include the elements that you wish to show.

Rather than use:

{{ form }}

use:

{{ form.field_name }}

or break it down further, like:

{{ form.field_name.html_name }}

etc

Consequently, depending on how much you wish to omit, you may need
code the HTML tags and attributes.
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/
> d/msgid/django-users/
> xepYvHchH7kpHYeaYe7ByePm8VQYSjgIEzyGjSKDhOcAOhbh7j1vLmwSgLEgC5kkq-
> wYMOHjPM7--mLSu9w22I_BT9A-sQjZgTxVi9RR8IM%3D%40protonmail.com.

Reply all
Reply to author
Forward
0 new messages