Forums

Generated Fields to Template

bytekultur 30 Dec, 2013
Hello

I made a small cart where the customer can add flexicontent articles and acctually should change how many of each he wants (its all about books)



I'm able to send which books he choose (throu a hidden field which has an id) - but acctually i prevere to send the Fields above (flexi content items).

But how do i add those fields to my template? there are 100 of diffrent books (field ids)

Hope my question is understandable? :-)

All the best,
Maya
GreyHead 30 Dec, 2013
Hi Maya,

It's next to impossible to answer this as you haven't given any details about how or where you are adding these items to your form (or is it a listing?).

You can certainly save ids and quantities if you need to, it's just a question of setting up inputs with appropriate names and adding the values to them.

Bob
bytekultur 06 Jan, 2014
Hello, sorry for late replay.

I have a "custom Element" where i read out the Sessions (where the books are stored) - out of these i make the list with the inputboxes. The inputboxes are same named as the book (instead of spaces there are underscores)

Hope this helps?

Thank you very much for your help!

All the best in 2014
Maya
GreyHead 07 Jan, 2014
HI Maya,

I think that in the Custom Code I would add the book ID to the name of the checkbox input. Then you can check the form results to see the book ID and the quantity. Something like this:
<input type='checkbox' name='book['9999']' id=book_9999 value='0' />

Bob
This topic is locked and no more replies can be posted.