How to modify default action of Submit Button
Hi Everyone,
I have a page containing Sitefinity Form, i need to modify the default action of button submit on my Form, how to do that?
Thanks for any suggestions..
Regards,
Eddy
Hi Eddy. You can do it with Javascript. Or do you want to do it on server side?
$(document).ready(
function
()
$(
'form'
).on(
'submit'
,
function
(e)
// validation code here
if
(!valid)
e.preventDefault();return false;
);
);
Hi Victor,
At the first time, i will try it with javascript
Thanks for the enlightenments..
Regards,
Eddy
Where would you put the javascript? in a file or in Sitefinity? If so where in Sitefinity?
Hi Aude,
I think that is not a problem whether we put it within Sitefinity script widget or in an external file(linked in .master file) since sitefinity can access it.
Regards,
Eddy