html button
Hello,
I'd like to save a form with my own html button in addition to the default submit button. I tried adding fd.save() and fd.submit(); to the onclick event of the html button but neither worked. After I save the form with my button, I'd like to redirect back to the add new form with passed parameters (querystring) ID, and additional field values from the prior screen. Please advise.
Thanks.
I'd like to save a form with my own html button in addition to the default submit button. I tried adding fd.save() and fd.submit(); to the onclick event of the html button but neither worked. After I save the form with my button, I'd like to redirect back to the add new form with passed parameters (querystring) ID, and additional field values from the prior screen. Please advise.
Thanks.
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hello,
First, you have to put button to your New form. Next, place the following script to OnClick property of your button:
Please, pay attention that I put the comment in place where you have to define your query parameters which will be passed to the next new form.
First, you have to put button to your New form. Next, place the following script to OnClick property of your button:
Code: Select all
fd.onsubmit(function () {
// Here you have to define URL with your additional query parameters.
// Users will be redirected to it after the form submission.
var source = location.pathname + '?ID=&additionalParams=';
$("#aspnetForm").attr('action', location.pathname + '?Source=' +
encodeURIComponent(source));
return true;
});
// Submission of the current form
fd.save().click();
-
- Information
-
Who is online
Users browsing this forum: No registered users and 7 guests