sciactive / pnotify

Beautiful JavaScript notifications with Web Notifications support.
https://sciactive.com/pnotify/
Apache License 2.0
3.65k stars 514 forks source link

How to get the values of multi-input Form #353

Closed boulepick closed 5 years ago

boulepick commented 5 years ago

Hi, in version 3 i was able to get the input values of a form created through Pnotify. like below

`
var notice = new Pnotify(param);

      notice
        .get()
        .find('form.custForm')
        .on('click', '[name=cancel]', () => {
          notice.remove();
        })
        .submit(function (e) {
          e.preventDefault();
          opt.cField = $.trim($(this).find('input[name=cField]').val());
          opt.cField1 = $.trim($(this).find('input[name=cField1]').val());
          opt.cSel = $.trim($('option:selected', $(this)).val());
          opt.cSelDesc = $('option:selected', $(this)).text();}`

however in version 4 this is not working.

how would i go to get the values of a multi-input form?

Thank you

hperrin commented 5 years ago

Instead of notice.get(), use notice.refs.elem.