Custom button inside Create New Registry form

Custom button inside Create New Registry form

AyalaskinAyalaskin Posts: 5Questions: 3Answers: 0
edited December 2015 in Buttons

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

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Answer ✓

    1) I want to add a custom button to the right of this select

    There are two options for this:

    1. Use field().input() to get a reference to the select element and then just use insertAfter() to add the button (which whatever event listeners you want to have attached to it).
    2. Create a custom field type which creates exactly the DOM you need.

    2) Or I want to add a custom button to the left of the 'Create' button in the bottom of the window

    You can use the buttons() method for that (which can also be accessed through the API methods such as create() and the init option formOptions.main depending on how you are using Editor.

    Allan

  • AyalaskinAyalaskin Posts: 5Questions: 3Answers: 0

    Thank you. I will try it out to see what I can do.

This discussion has been closed.