• Resolved CharlieCoplestone

    (@charliecoplestone)


    Hello,

    I’ve created an external API endpoint on a separate website which I’d like to feed data to when a fluent form is submitted. I’m attempting to use the fluentform/submission_inserted action hook to do this but according to the documentation here:

    https://fluentforms.com/docs/fluentform_submission_inserted/

    The first step is to add a do_action:

    do_action('fluentform/submission_inserted', $insertId, $this->formData, $this->form);

    But $insertId is of course undefined at this point.

    I’m probably missing something but I can’t see any prior steps in the documentation.

    Any help would be greatly appreciated.

Viewing 1 replies (of 1 total)
  • Hi @charliecoplestone,

    do_action is used to define the action hook. If you want to use the hook then you have to use add_action.

    You have to use the hook using this code –

    add_action('fluentform/submission_inserted', 'your_custom_after_submission_function', 20, 3); 
    
    function your_custom_after_submission_function($entryId, $formData, $form) { 
        // DO your stuffs here 
    }

    Also, you can find our new developer documentation here.

    Thank you!

Viewing 1 replies (of 1 total)

The topic ‘fluentform/submission_inserted Action Hook’ is closed to new replies.