EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
December 14, 2024, 03:44:18 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
Adding custom data to a form
Pages: [
1
]
« previous
next »
Print
Author
Topic: Adding custom data to a form (Read 14911 times)
peter
Newbie
Posts: 10
Adding custom data to a form
«
on:
April 10, 2012, 03:35:53 AM »
I have a form and I need to send extra data with the form.
The data to be sent is a complex structure, so using a hidden input element
in the form isn't going to be enough.
I had a look at the form plugin, and there is a reference to "data".
I tried adding it with 'data' as shown, but that doesn;t work.
$(formId).form('submit',{
url: url,
data: {xxx: 'yyy'},
onSubmit: function(){
return $(this).form('validate');
},
success: function(result){
...
Thanks,
Peter
Logged
Kevin
Jr. Member
Posts: 52
Re: Adding custom data to a form
«
Reply #1 on:
April 13, 2012, 04:10:38 PM »
Hi Peter
I've done something similar but I just sent this data as part of the url post. ie.
url = 'PHP/update_data.php?part=0&user=1001&status='+row.status;
The framework will append your form data to this. Of course, if your data is a lot more complexed, you could send a $.post after receiving a success to your form data.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...