Home Forums General Issues Not Able to Get The ACF Text Field Shortcode


Not Able to Get The ACF Text Field Shortcode

  • Hello, I am trying to get the WPForm shortcode (text format) from the ACF text field. i use the get_field() function. I know it gets the correct field, but the problem is that when try to echo the value, it displays the forms itself while I need the shortcode in textformat value. the objective is for me to be able to take WPForm ID from that shortcode. below is my code:

    $formID = get_field( ‘form_box’, get_the_ID());
    $flag = 0;
    $i = 1;
    $groupTitle = “”;
    foreach($groupingCountry as $groupID => $groupObj){
    foreach($groupObj[‘group_list’] as $key => $value){
    if($countryID == $value){
    $flag = 1;
    $groupTitle = $groupObj[‘group_title’];
    //echo “groupID =”.$groupID.” | group_title =”.$groupObj[‘group_title’].” | group_list =”.$value.” | countrycode =”.$countryID ;
    echo $formID;
    $folder = array(
    ‘post_id’ => get_the_ID(),
    ‘post_title’ => get_the_title(),
    ‘post_url’ => get_the_permalink(),
    ‘post_country’ => $countryID,
    ‘post_folder_group’ => $i,
    ‘post_folder_group_title’ => $groupTitle
    $folders[] = $folder;
    break 2;
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.