EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: chrwei on August 22, 2013, 01:10:10 PM



Title: form onsubmit (param) clarification
Post by: chrwei on August 22, 2013, 01:10:10 PM
when using "onSubmit: function(param){" is param supposed to be pre-filled with the form data?  the documentation doesn't say either way.


Title: Re: form onsubmit (param) clarification
Post by: stworthy on August 22, 2013, 06:53:18 PM
Yes, you can append extra submitting parameters in 'onSubmit' event. The code below shows how to do this.
Code:
$('#ff').form('submit', {
    url:...,
    onSubmit: function(param){
        param.p1 = 'value1';
        param.p2 = 'value2';
    }
});


Title: Re: form onsubmit (param) clarification
Post by: chrwei on August 23, 2013, 06:24:37 AM
when I do param.text_box_name I get undefined.