Support » Plugin: Participants Database » Call a function after the save button on pdb_signup

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

    (@xnau)

    There are two approaches to this, one would be to set up a javascript AJAX call to your function, the other would be to use a hook that is fired after the signup is submitted. Take a look at the Plugin API for some direction on how to do that.

    Thread Starter thierry.bonnechere

    (@thierrybonnechere)

    Thank you.

    I did try the hook but don’t know how to proceed.
    In the database there is field name : Title.
    I need to get the field value in the functionX.

    In the template for thanks page :

    echo $this->get_thanks_message();
    $post_id = functionX($this);

    In functions :

    function functionX($post) {
    	$post_id = -1;
    	$title = XXXXX;
    ...
    }
    add_action('pdb-after_submit_signup', 'functionX');

    Plugin Author xnau webdesign

    (@xnau)

    I can’t tell what you’re trying to accomplish with the code provided, but you probably won’t be calling your function in the template. Try putting a “print_r($post)” statement in your callback, then submit the form, that will show you what you’ve got to work with. (warning: the data will appear on the screen.)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Call a function after the save button on pdb_signup’ is closed to new replies.