Saturday, July 25, 2015

Re: Shows text field is required even before submission

The last line of your view should read:

return render(response, 'signup.html', {'form': form})

Currently you are constructing it with the POST data, which is empty on GET requests. Therefore giving you field is required errors. 

-T



On Jul 25, 2015, at 12:39 AM, Krishnanunni Radhakrishnan <krishnanunnir97@gmail.com> wrote:

View

Template


Form


Server

What am i doing wrong?What should I change in order for The field is required to appear only after submission?

--
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2aa7deea-9506-4966-9f51-4e2c861031a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment