• Hi, Would love any help on this please.

    Aim: Visitor sees a profile page then clicks link to fill in form which looks up post ID and populates two separate Types shortcode (in separate fields) e.g wpcf-email, wpcf-department

    I can get it to look up the post ID and populate an email Types shortcode but not a second shortcode on the profile page.

    Thinking it’s missing something in the functions file?

    add_shortcode('user_post-id', 'user_post_id_shortcode');
    function user_post_id_shortcode() {
    global $post;
    return $post->ID;
    }
    
    add_filter("gform_field_value_wpcf-email", "populate_email");
    function populate_email($value){
    $id = intval( $_GET['userID'] ); // get id from url
    $email = get_post_meta( $id, "wpcf-email", true); // get email THIS WORKS
    return $email;
    }
    
    add_filter("gform_field_value_wpcf-department", "populate_department");
    function populate_department($value){
    $id = intval( $_GET['userID'] ); // get id from url
    $email = get_post_meta( $id, "wpcf-department", true); // get department THIS DOESNT WORK
    return $department;
    }

    Or anything else I need to do to get Gravity Forms to look up Types data?

    Thank you 🙂

    https://ww.wp.xz.cn/plugins/types/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Gravity Form not liking Types’ is closed to new replies.