Forum: F.A.Q

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support and general questions related to GEO my WP plugin and its core add-ons please use the support forum.

[Resolved]updating locations vis CRED form from wp-types no longer working

Forums F.A.Q updating locations vis CRED form from wp-types no longer working

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #50161
    chunkymac
    Member

    I have a front end form using CRED from wp-types on a custom post type and was using the following code where the cred form has id 1200, the custom field being used for the address to geocode is wpcf-new-address and the cpt is specialist. When the form submits, no geocoding happens and there i sno reported error message.

    This was working but is no longer – where is this going wrong?

    #50162
    chunkymac
    Member

    Appears code did nto render properly:

    add_action(‘cred_save_data_12000’, ‘save_data_for_form_with_id_12000′, 10, 2 );
    function save_data_for_form_with_id_12000( $post_id, $form_data ) {

    include_once( GMW_PT_PATH .’/includes/gmw-pt-update-location.php’ );

    if ( function_exists( ‘gmw_pt_update_location’ ) ) {

    $args = array(
    ‘post_id’ => $post_id,
    ‘post_type’ => ‘specialist’,
    ‘post_title’ => get_the_title( $post_id ),
    ‘address’ => get_post_meta( $post_id, ‘wpcf-new-address’, true),
    );

    gmw_pt_update_location( $args );

    }
    }

    #50186

    Hi,
    The function above looks fine so it is hard to tell where the issue is.

    Can you please place

    before

    To see if the function being included at all and if the address properly retrieved from the custom field.

    Let me know if you get the data printed on the screen when submitting the form.

    #50187

    BTW,
    To display code properly in the forum you should wrap it within PRE tags.

    #50199
    chunkymac
    Member

    Many thanks for confirming that the code looks correct. I have been able to make it work by cleaning out my functions.php file and disabling some plugins – just need to work out what the conflict is.

    Thanks

    #50219

    You are very welcome.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘updating locations vis CRED form from wp-types no longer working’ is closed to new replies.