• Resolved danifola

    (@danifola)


    Hi!
    I need to insert a record in a table after the form is submitted.
    What hook can I use?
    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @danifola

    Hope you’re doing well!

    Please let us know more information about what you’re looking to achieve? What kind of record needs to be inserted into the submission details?

    Please advise

    Kind regards,
    Nastia

    Thread Starter danifola

    (@danifola)

    Hi Nastia,

    I need to write a table I defined for my specific website. It’s not directly related to the data in the form I created with forminator.
    What I need is just to know is what hook to use to setup an action that will insert a record. On a side note, I use the get_form method to get information from the form.

    So, I just need to capture the event of the form being submitted.

    Thanks.

    Hello @danifola

    I trust you’re doing well!

    Please try to use forminator_custom_form_submit_before_set_fields hook. Please see an example

    
    /**
                                 * Action called before setting fields to database
                                 *
                                 * @since 1.0.2
                                 *
                                 * @param Forminator_Form_Entry_Model $entry - the entry model
                                 * @param int $form_id - the form id
                                 * @param array $field_data_array - the entry data
                                 *
                                 */
                                do_action( 'forminator_custom_form_submit_before_set_fields', $entry, $form_id, $field_data_array );

    Hope this helps!

    Kind regards,
    Nastia

    Plugin Support Dimitris – WPMU DEV Support

    (@wpmudev-support6)

    Closing this topic due to recent inactivity.
    Feel free to post back any update or create a new topic and we’ll be glad to carry on troubleshooting. ??

    Thank you,
    Dimitris

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Forminator – Hook to do action after form submit’ is closed to new replies.