Add/Remove Formset dynamically with javascript¶
Django Form Builder provides a particular type of field, CustomComplexTableField
,
that allows user to easily insert Django Formset Fields in his form.
The built-in javascript enables form inserting and removing via frontend, simply using the relative buttons!
To build a formset just define the CustomComplexTableField
attribute valore setting columuns.
Divide each one using # char and, for every column, define the field type with a dictionary, like in the example
column1({'type':'CustomSelectBoxField', 'choices': 'value1;value2;value3',})#column2({'type':'CustomRadioBoxField', 'choices': 'value1;value2',})#column3#column4({'type':'BaseDateField',})
Column with no params dict generate CustomCharField
by default.