lundi 13 avril 2015

Datagrid inside a datagrid, how to get the data from the form?

enter image description here


I have datagrid field inside of a datagrid field (Collective.z3c.form.datagridfield)


It works from from a front end standpoint. However, when I submit the form the received data is as follows:



'questions': [{'choices': [], 'questionContent': u'Question 1 ', 'typeOfQ': None}]


Choices is the 2nd datagrid which is returned as an empty array. Is there a better to have a n number of questions with n number of choices inside? I don't know enough about subforms or widgets to know if creating either would be a solid option.


I am working with: python, z3c.forms, plone


Aucun commentaire:

Enregistrer un commentaire