• Created custom tag, works and show as expected, problem is value isnt populated, here is the code:
    function custom_add_form_tag_text() {
    wpcf7_add_form_tag( ‘f_price’, ‘text’, ‘custom_add_form_tag_handler’, array( ‘name-attr’ => true ));
    }
    function custom_add_form_tag_handler( $tag ) {
    global $post;
    $jcat_stored_meta = get_post_meta($post->ID);
    $forklift_price = $jcat_stored_meta[‘_forklift_price’][0];
    $output = ‘<input type=”hidden” name=”f_price” value=”‘.$forklift_price.'” class=”wpcf7-form-control wpcf7-hidden”>’;
    return $output ;
    }

    and the form tag
    [hidden f_price]
    you can see the field shows up inspectign the page, but the value is empty?
    any help appreciated.
    Jeff

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom form tag function not populating value’ is closed to new replies.