Add custom fields

Hi,

I trying create fields on doctype dynamically, while clicking the button.

frm.add_custom_field(`Name of establishment ${i}`, {
                fieldtype: 'Data',
                label: `Name of establishment ${i}`,
                reqd: 1
            });

I tried using this function, it seem there is no function like that.

Any other suggestion.

I am using,

erpnext 15 version

On the click of button, call a python function

then from python function create a record in “Custom Field List” according to details

1 Like