Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add this to your examples please.... #367

Open
soljohnston777 opened this issue Jan 28, 2018 · 1 comment
Open

Add this to your examples please.... #367

soljohnston777 opened this issue Jan 28, 2018 · 1 comment

Comments

@soljohnston777
Copy link

soljohnston777 commented Jan 28, 2018

It took me a while to figure this out, but could you please add this to your examples to help others.

It helps with data binding info and being able to save that info in an easy to see JQuery format.

Thanks for your great and absolutely wonderful bootstrap dialog program!
Sol

BootstrapDialog.show({
          title: 'title',
          message: 'Put data into field <input id="test">',
          onshown: function(dialog) {
              $('#test').val("added text");
          },
          buttons: [{
              label: 'Save',
              cssClass: 'btn-primary',
              id: 'btnSave',
              action: function (dialog) {
                  if ($(this).on('click')) {
                      alert($('#test').val());
                      dialog.close();
                  }
              }
          },{
              label: 'Cancel',
              cssClass: 'btn btn-danger',
              id: 'btnClose',
              action: function (dialog) {
                  dialog.close();
              }
          }]
      }).open();
@nakupanda
Copy link
Owner

@soljohnston777 Thank you, will do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants