Where set the create title and buttons text?

Where set the create title and buttons text?

ztevieztevie Posts: 101Questions: 23Answers: 5
edited December 2016 in Free community support

I've searched and tried everything, nothing makes an effect. I would have thought you could set it in the editor - formOptions - create, but it does nothing.
Obviously I mean the title and buttons "Save"text in the bubble where I create a new row.
Here's how I set the buttons:

buttons: [
            { extend: 'create', editor: editor, text: '<i class="fa fa-user-plus"></i> Ny användare' },
            { extend: 'collection',
                text: '<i class="fa fa-download"></i> Exportera',
                autoClose: true,
                buttons: [
                    { extend: 'copy', text: '<i class="fa fa-clipboard"></i> Kopiera' },
                    { extend: 'excel', text: '<i class="fa fa-file-excel-o"></i> Excel' },
                    { extend: 'csv', text: '<i class="fa fa-clipboard"></i> CSV' },
                    { extend: 'pdf', text: '<i class="fa fa-file-pdf-o"></i> PDF' },
                    { extend: 'print', text: '<i class="fa fa-clipboard"></i> Skriv ut' }
                ]
            }
        ],

This question has an accepted answers - jump to answer

Answers

  • ztevieztevie Posts: 101Questions: 23Answers: 5
    Answer ✓

    Ok, found formTitle and formButtons which did the trick:

    buttons: [
                { extend: 'create',
                    editor: editor,
                    text: '<i class="fa fa-user-plus"></i> Ny användare',
                    formTitle:'New user',
                    formButtons: [{
                            label: 'Cancel',
                            fn: function() { this.close(); }
                    },
                    'Save'
                ]
                },
                { extend: 'collection',
                    text: '<i class="fa fa-download"></i> Exportera',
                    autoClose: true,
                    buttons: [
                        { extend: 'copy', text: '<i class="fa fa-clipboard"></i> Kopiera' },
                        { extend: 'excel', text: '<i class="fa fa-file-excel-o"></i> Excel' },
                        { extend: 'csv', text: '<i class="fa fa-clipboard"></i> CSV' },
                        { extend: 'pdf', text: '<i class="fa fa-file-pdf-o"></i> PDF' },
                        { extend: 'print', text: '<i class="fa fa-clipboard"></i> Skriv ut' }
                    ]
                }
            ],
    
  • allanallan Posts: 61,635Questions: 1Answers: 10,092 Site admin

    Thanks for posting back. Those options are indeed the best way of doing it with the provided buttons.

    Allan

This discussion has been closed.