• Resolved nicheru

    (@nicheru)


    Hi,

    Your plugin is really great, but now I am having an issue when adding an action for caldera_forms_submit_complete. When submitting it will save 2 entries.

    Is there any hook after the entry is saved?

    Or probably I am doing something wrong.

    I just followed this –

    <?php
    add_action( ‘caldera_forms_submit_complete’, ‘slug_process_form’, 55 );
    function slug_process_form( $form ) {

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

    //get embedded post ID.
    $embeded_post_id = absint( $_POST[ ‘_cf_cr_pst’ ] );

    /** DO SOMETHING WITH $data here **/

    }

    Thank you.

    Nicheru

    https://www.ads-software.com/plugins/caldera-forms/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor David Cramer

    (@desertsnowman)

    This is really strange. nothing in there would cause a double entry being saved.

    I’ll need to test and figure it out.

    Thread Starter nicheru

    (@nicheru)

    Hi David,

    Thank you for the response. There is nothing wrong with the function.
    I have traced it and the error occurs because of validation.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘caldera_forms_submit_complete issue – double entry’ is closed to new replies.