• Resolved soulwasted

    (@soulwasted)


    Hi.

    I need to call custom script/shortcode after submission is completed.
    The best way for me is when success message is displayed.

    In my case.
    — When new submission is made, it has it’s own unique ID.
    — I need to generate PDF with information from this submission.
    — I think that best place is “success message” where I have all ERF variables from ERF form.

    Or do you have some API for callback when submission is made?

    Thank you!
    pep?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author easyregistrationforms

    (@easyregistrationforms)

    Hi @soulwasted,

    You can use one of our action : erf_post_submission
    Registered function will get one parameter with submission information. Let me know if it doesn’t work for you.

    Thread Starter soulwasted

    (@soulwasted)

    Ouukey…
    But how to use it?
    I mean how to exactly call my function when just registration is made? Let’s say form#1.
    I don’t want to call my function when using another ERF form to make custom posts and to edit them. form#2

    Plugin Author easyregistrationforms

    (@easyregistrationforms)

    Hi,

    You can add the it in your theme’s functions.php. Here is the sample code:

    add_action(‘erf_post_submission’,’after_submission’);
    function after_submission($submission){
    if($submission[‘form_id’]==4){ // Compare your form ID
    }
    }

    Let me know if you have any more questions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Call custom script/shortcode after submission’ is closed to new replies.