Forums

Forums / Developing Portals / How to handle formsubmission events?

How to handle formsubmission events?

2 posts, 0 answered
  1. Max Bayer
    Max Bayer avatar
    4 posts
    Registered:
    28 Sep 2023
    22 Jan
    Link to this post
    Hello,

    how do you handle form submission events, inside the controller of a form widget?

    I created a widget and added it to the Form Toolbox using the "Toolbox = FormControls" Parameter of the ControllerToolboxItem.

    Now I tried subscribing to the "ITpcPreMvcFormSubmitEvent" event, like here.
    The Bootstrapper_Initialized was called and the Subscribe function was called.

    After building, pressing the Submit button of a form does not invoke the function(s). The clientside validation for example, does work.

    My current goal is to call a function inside my custom widget (controller) when pressing the submit button.

    Additional Info:
    Sitefinity CMS 14.4
    Portel Connector 6.2.9144.105
    VS 2019


    Update:

    I got the events (at least for the stock tpc widgets) to get triggered. Also when using my custom widget the "ITpcPreMvcFormSubmitEvent" gets triggered (after subscribing to the event), when another existing TPC widget is also inside the form.

    I still dont know how  to trigger a event / the ITpcPreMvcFormSubmitEvent when only my custom widget is inside a form / TPC Form Layout


    Last modified on 23 Jan 2024 09:01 by Max Bayer
  2. Rawdon Edghill
    Rawdon Edghill avatar
    76 posts
    Registered:
    16 Dec 2020
    23 Jan
    Link to this post
    Hi Max,

    Thank you for your question. 

    Would you be able to send tpcsupport@serenichelp.zendesk.com an email so that a developer can work with you one on one with this issue. 

    Regards,
    Rawdon
2 posts, 0 answered