I need a widget which has add/remove of subforms via Javascript (create-read-update-delete).
It would be similar to DataGridField, but instead of having lines it would present subforms as blocks.
A jQuery plug-in example: http://vipullimbachiya.com/jQuery/Plugins/MultiField/SampleMultiField.htm#example
Does z3c.form or Plone has this kind of subform CRUD widgets already? The main thing would be implement this 100% on the client side, without HTTP postback when you press add/remove buttons.
There is plone.z3cform.crud
/ plone.app.z3cform.crud
:
class IOneEntry(interface.Interface):
# Schema definition
class MainForm(crud.CrudForm):
update_schema = IOneEntry
def get_items(self):
# return items implementing IOneEntry
def add(self, data):
# Add one IOneEntry object
def remove(self, (id, data)):
# Remove one IOneEntry object
but this does not use AJAX to add entries.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.