Re: how to do this?
okay i solved it by rendering a list of names
Am Sonntag, 27. Mai 2012 08:07:26 UTC+2 schrieb doniyor:
yeah, you are right.. now i have another html-related problem. well, now i have even all html fields created thru for-loop. but now all of them have the same attr value: name="prod". and now i want to refer to all of them and send all as email to the buyer. how can i make reference to all field names or is there a way of giving names dynamically... i am stuck cos now in my view i have this line which get the data from field..prod = request.POST.get('prod'). but it is getting only the first value in the list, because others have also the same name 'prod'. i want to get all of them..sorry for being dumb
Am Sonntag, 27. Mai 2012 07:40:58 UTC+2 schrieb lawgon:On Sat, 2012-05-26 at 07:03 -0700, doniyor wrote:
> for example: user has selected 3 items from products table and then
> goes to
> next step where he sees what he has selected and then he submits the
> booking with some last information of his personal. the point is that
> if
> he has selected 3 items, then there are 3 items in db, so i create 3
> html
> input fields for each selected item where i will render the data that
> i get
> from db. thats why i want to create these html input fields according
> to
> the number of items in db..
this is easily done with a for loop in the template
--
regards
Kenneth Gonsalves
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/9ttON1EogFQJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home