[SOLVED] Hanlder text in app.dialog.confirm

How can I edit text of button in dialog confirm? Should I use app.dialog.create?

Yes, for this case you need to create custom dialog

like this?

app.dialog.create({
    title: 'My title',
    text: 'warning. . .',
    buttons: [
      {
        text: 'Button 1',
      },
      {
        text: 'Button 2',
      },
      {
        text: 'Button 3',
      },
    ],
    verticalButtons: true,
  }).open();
  1. How can I control Button 1 function, Button 2 function?
  2. How can I make button look like button in confirm and edit text for the button?
    image

Why not to check the parameters at http://framework7.io/docs/dialog.html#dialog-parameters/?

Apparently you need to disable verticalButtons, add two buttons instead of three, each button has onClick parameter where you can pass the required function

app.dialog.create({
                    title: '<div class="dialog-title dialog-title-custom">Thông Báo</div>',
                    text: '<div class="dialog-inner dialog-inner-custom">Bạn muốn thực hiện cuộc gọi tới tổng đài đặt vé VnTicket 1900xxxx ?</div>',
                    buttons: [
                        {
                            text: '<div class="dialog-button">Cancel</div>',
                        },
                        {
                            text: '<div class="dialog-button">Ok</div>',
                            onClick: function () {
                                window.location.href = "tel: 1900xxxx";
                            },
                        },
                        
                    ],
                    on: {
                        open: function () {
                            $$('.dialog-inner').removeClass('dialog-inner');
                            $$('.dialog-inner-custom').addClass('dialog-inner');
                        }
                    }
                }).open();

image

It just not right, can you give me an example?

I found it

app.dialog.create({
                    title: 'Thông báo',
                    text: 'Bạn muốn thực hiện cuộc gọi tới tổng đài đặt vé  19005xxx ?',
                    cssClass: 'custom-dialog',
                    closeByBackdropClick: 'true',
                    buttons: [
                        {
                            text: 'Hủy',
                        },
                        {
                            text: 'Đồng ý',
                            onClick: function () {
                                window.location.href = "tel: 1900xxx";
                            },
                        },
                    ],
                }).open();
1 Like