• Hello people. I’m using Caldera forms im my work and i have to send the form data to a server. I tried to do this using a processor, i mean i have included this action to be executed in my php shortcode associated with the form:

    add_action(‘caldera_forms_submit_complete’, ‘functionToExecute’, 55 );

    function functionToExecute($form){
    $data= array();
    foreach($form[‘fields’] as $field_id => $field) {
    $data[$field[‘slug’]] = Caldera_Forms::get_field_data($field_id, $form);
    }

    //sanitize data and send to a server

    }

    I put some echo to see some data.
    It appears that this function only execute when i include a die(); at the end of the shortcode.
    If i put a comment in the die function, it appears the function is not executed. it doesn’t show anything, the echoes, messages, nothing.. only show the success message after a submit.
    I can’t return a value from this function to be used in the “success message” for example.
    I nedd a help from you guys, because i don’t know where i’m doing wrong. if i’m using the wrong action, etc..

    Thanks in advance.

    https://ww.wp.xz.cn/plugins/caldera-forms/

The topic ‘Form data submit’ is closed to new replies.