Saturday, April 2, 2016

Multiple values to Django

Hello! I have a MyForm which have name, quantity and quandesc fields.

I have a basic UI form for adding this fileld.

I added button for adding another instances of field on web page. Jquery func below:

function addContainer() {
    $
("#name").clone().appendTo("#food-container");
    $
("#quantity").clone().appendTo("#food-container");
    $
("#quandesc").clone().appendTo("#food-container");
}

But after that, if I send data, I have a value of last name, quantity and quandesc fields.

How add functionality for support multiple data instances of this fields?

--
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/0c36581a-f16b-4be6-80c3-0a3d4ecbe739%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment