• hi i have next code in functions php and dont get result in email
    when i call [suma]
    //////////////////////////////////////////////////
    function add_suma_to_cf7()
    {
    $html = ‘<input text name=”suma”>’;
    $custom_fields = get_post_custom(get_the_ID());
    foreach(@$custom_fields[‘amount’] as $total)
    echo $html .= $total;
    $html .='</text>’;
    }
    add_shortcode(‘suma’, ‘add_suma_to_cf7’);

    https://www.ads-software.com/plugins/contact-form-7/

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m just new to hacking this plugin but I think your problem might be that you need to add return $html; at the end of the function.
    Hope that helps

    Thread Starter jovicbratislav

    (@jovicbratislav)

    function add_suma_to_cf7()
    {
    $html = ‘<input text name=”suma”>’;
    $custom_fields = get_post_custom(get_the_ID());
    foreach(@$custom_fields[‘amount’] as $total)
    echo $html .= $total;
    $html .='</text>’;
    return $html
    }

    ///////////////////////////////////////

    that you think

    Thread Starter jovicbratislav

    (@jovicbratislav)

    when i try example and put [suma] in email body don get nothing why?

    Thread Starter jovicbratislav

    (@jovicbratislav)

    i think function is not good beacuse i dont update email body

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘custom field not working not calling’ is closed to new replies.