How to add another button to editor dialog?

How to add another button to editor dialog?

uniquepitouniquepito Posts: 3Questions: 2Answers: 0

There is a nice default dialog in DataTables editor for Create/Update operations.
There are default Create/Update buttons, I'd like to add another button with custom action to fill/update some of fields from dialog.

For example I'd like to implement Paste button, which would fill my fields from clipboard.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,791Questions: 1Answers: 10,513 Site admin

    Details on how to create custom buttons can be found here. That approach, plus the Editor API is used in this example to create a duplicate button.

    I don't have an example showing how to do a paste, but that is the starting point for how to create custom buttons.

    Allan

  • uniquepitouniquepito Posts: 3Questions: 2Answers: 0

    I believe there's a misunderstanding with the buttons.
    I'd like to put my own button on dialog which is shown when I hit New/Edit button.
    Now when I hit New button it opens me dialog, where I can enter values and I can see only Create button on this dialog. What I need is to add my custom button with custom action into this dialog (near Create button or on the top of dialog.)

  • allanallan Posts: 63,791Questions: 1Answers: 10,513 Site admin
    Answer ✓

    Oh I see - sorry. Use buttons to control the buttons shown inside the editing lightbox. You can also use the formButtons option of edit (etc) to control those buttons.

    Allan

This discussion has been closed.