how to do server side form validation for dynamic inputs with Django
Posted
by Satoru.Logic
on Stack Overflow
See other posts from Stack Overflow
or by Satoru.Logic
Published on 2010-05-06T02:27:43Z
Indexed on
2010/05/06
6:28 UTC
Read the original article
Hit count: 214
Hi, all.
I am using django.forms.Form
to validate form data in a survey applications.
In a survey-creating form, a user can submit multiple questions that belong to the survey being created.
Names for the question inputs are in the form of 'question_seq
' , where seq
is maintained using Javascript.
Back in the server side, my code doesn't know before hand how many such questions will be submitted.
Is there any way to do this with Django form so that the form can automatically recognizes the questions
and validate them?
© Stack Overflow or respective owner