Custom button inside Create New Registry form
Custom button inside Create New Registry form
Hello.
When I click the 'New' button in the datatables, it pops a window to create new registry.
In my form, one of the inputs is a select.
I want to do one of the following:
1) I want to add a custom button to the right of this select (I will use it to add a new record to the select, without closing the window).
2) Or I want to add a custom button to the left of the 'Create' button in the bottom of the window (which will do the same).
Is this possible?
How?
Thank you!
This question has an accepted answers - jump to answer
Answers
There are two options for this:
field().input()
to get a reference to the select element and then just useinsertAfter()
to add the button (which whatever event listeners you want to have attached to it).You can use the
buttons()
method for that (which can also be accessed through the API methods such ascreate()
and the init optionformOptions.main
depending on how you are using Editor.Allan
Thank you. I will try it out to see what I can do.