How to modify default action of Submit Button - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

How to modify default action of Submit Button

  • 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 Victor,

    At the first time,  i will try it with javascript

    Thanks for the enlightenments..

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

  • 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