Forums

Forums / General Discussions / How to prevent saving form in tpc:pre-submit function.

How to prevent saving form in tpc:pre-submit function.

Thread is closed for posting
2 posts, 1 answered
  1. Srikanth Konanki
    Srikanth Konanki avatar
    1 posts
    Registered:
    04 Dec 2018
    17 Dec 2018
    Link to this post
    I tried event.preventDefault(), it didn't work, returning false didnt work either.
  2. Josh
    Josh avatar
    47 posts
    Registered:
    01 Jun 2018
    Answered
    29 Oct 2019 in reply to Srikanth Konanki
    Link to this post

    Hello Srikanth,

    Returning false from the tpc:pre-submit handler should be all that is required to prevent the form submission. You could try to use the tpc:validate form submission event to do something similar, although it is likely that custom JavaScript code is the reason that this form continues to submit.

    If you would like, feel free to post your code in this thread so we can see if anything looks out of the ordinary, or send an email to support@crmportalconnector.com where can help you continue to debug this problem.

    Cheers,

    Josh

2 posts, 1 answered