How to modify default action of Submit Button

Posted by Community Admin on 04-Aug-2018 07:16

How to modify default action of Submit Button

All Replies

Posted by Community Admin on 16-Aug-2016 00:00

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

Posted by Community Admin on 16-Aug-2016 00:00

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;
    
  );
);

Posted by Community Admin on 16-Aug-2016 00:00

Hi Victor,

At the first time,  i will try it with javascript

Thanks for the enlightenments..

Regards,

Eddy

 

Posted by Community Admin on 25-Aug-2016 00:00

Where would you put the javascript? in a file or in Sitefinity? If so where in Sitefinity?

Posted by Community Admin on 29-Aug-2016 00:00

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

This thread is closed