Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit template displays hidden fields #54

Open
caktus-philip opened this issue May 26, 2015 · 1 comment
Open

Edit template displays hidden fields #54

caktus-philip opened this issue May 26, 2015 · 1 comment
Labels

Comments

@caktus-philip
Copy link
Contributor

I have a form that needs to use some hidden fields (forms.HiddenInput()). The edit template displays these fields.

One possible fix is to change the edit template (https://github.com/caktus/django_bread/blob/develop/bread/templates/bread/includes/edit.html) a little. Right after this line:

{% for field in form %}

add this:

{% if field.field.widget.input_type != 'hidden' %}
@dpoirier
Copy link
Contributor

We can fix this by using separate loops for hidden and visible fields. See https://docs.djangoproject.com/en/dev/topics/forms/#looping-over-hidden-and-visible-fields

@dpoirier dpoirier added the bug label Feb 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants