Support

Account

Home Forums Front-end Issues Output the selected value

Helping

Output the selected value

  • Hi! I need some guidance on how to output the selected values from a select on front.

    I used this for renter and owner wonder(user_id==1) or renter(user_ID==0)

    This is how its setup in ACF:

    <img src="http://prnt.sc/v2thpx” alt=”ACF Setup” />
    Select Fields

    This is how I setup ACF
    if( function_exists(‘acf_add_local_field_group’) ):

    acf_add_local_field_group(array(
    ‘key’ => ‘group_5f8501f69e017’,
    ‘title’ => ‘Bizniness Rewards Programme’,
    ‘fields’ => array(
    array(
    ‘key’ => ‘field_5f85021b748a4’,
    ‘label’ => ‘Owner Level (Booking & Service Fee)’,
    ‘name’ => ‘BZ-Owner-Level-Booking’,
    ‘type’ => ‘select’,
    ‘instructions’ => ‘Update Membership Package’,
    ‘required’ => 0,
    ‘conditional_logic’ => 0,
    ‘wrapper’ => array(
    ‘width’ => ”,
    ‘class’ => ”,
    ‘id’ => ”,
    ),
    ‘formula’ => ”,
    ‘readonly’ => 0,
    ‘choices’ => array(
    10 => ‘Standard (10%)’,
    ‘9.5’ => ‘Bronze (9.5%)’,
    9 => ‘Silver (9%)’,
    ‘8.5’ => ‘Gold (8.5%)’,
    8 => ‘Diamond (8%)’,
    ‘7.5’ => ‘Opal (7.5%)’,
    7 => ‘Ruby (7%)’,
    ),
    ‘default_value’ => false,
    ‘allow_null’ => 0,
    ‘multiple’ => 0,
    ‘ui’ => 1,
    ‘ajax’ => 0,
    ‘return_format’ => ‘value’,
    ‘placeholder’ => ”,
    ),
    array(
    ‘key’ => ‘field_5f865bca62817’,
    ‘label’ => ‘Renter Level (Booking & Service Fee)’,
    ‘name’ => ‘BZ-Renter-Level-Booking’,
    ‘type’ => ‘select’,
    ‘instructions’ => ‘Update Membership Package’,
    ‘required’ => 0,
    ‘conditional_logic’ => 0,
    ‘wrapper’ => array(
    ‘width’ => ”,
    ‘class’ => ”,
    ‘id’ => ”,
    ),
    ‘formula’ => ”,
    ‘readonly’ => 0,
    ‘choices’ => array(
    15 => ‘Standard (15%)’,
    14 => ‘Bronze (14%)’,
    13 => ‘Silver (13%)’,
    12 => ‘Gold (12%)’,
    11 => ‘Diamond (11%)’,
    10 => ‘Opal (10%)’,
    9 => ‘Ruby (9%)’,
    ),
    ‘default_value’ => false,
    ‘allow_null’ => 0,
    ‘multiple’ => 0,
    ‘ui’ => 1,
    ‘ajax’ => 0,
    ‘return_format’ => ‘value’,
    ‘placeholder’ => ”,
    ),
    array(
    ‘key’ => ‘field_5f890f5954ffa’,
    ‘label’ => ‘Earned Points’,
    ‘name’ => ‘earned_points’,
    ‘type’ => ‘number’,
    ‘instructions’ => ”,
    ‘required’ => 0,
    ‘conditional_logic’ => 0,
    ‘wrapper’ => array(
    ‘width’ => ”,
    ‘class’ => ”,
    ‘id’ => ”,
    ),
    ‘default_value’ => 0,
    ‘placeholder’ => ”,
    ‘prepend’ => ”,
    ‘append’ => ”,
    ‘min’ => ”,
    ‘max’ => ”,
    ‘step’ => ”,
    ),
    ),
    ‘location’ => array(
    array(
    array(
    ‘param’ => ‘user_form’,
    ‘operator’ => ‘==’,
    ‘value’ => ‘edit’,
    ),
    ),
    ),
    ‘menu_order’ => 0,
    ‘position’ => ‘acf_after_title’,
    ‘style’ => ‘default’,
    ‘label_placement’ => ‘top’,
    ‘instruction_placement’ => ‘label’,
    ‘hide_on_screen’ => ”,
    ‘active’ => true,
    ‘description’ => ”,
    ));

    endif;

    I want to display the selected value something like this
    Display program

  • Hi! I need some guidance on how to output the selected values from a select on front.

    I used this for renter and owner wonder(user_id==1) or renter(user_ID==0)

    This is how its setup in ACF:

    <img src="http://prnt.sc/v2thpx” alt=”ACF Setup” />
    Select Fields

    This is how I setup ACF
    if( function_exists(‘acf_add_local_field_group’) ):

    acf_add_local_field_group(array(
    ‘key’ => ‘group_5f8501f69e017’,
    ‘title’ => ‘Bizniness Rewards Programme’,
    ‘fields’ => array(
    array(
    ‘key’ => ‘field_5f85021b748a4’,
    ‘label’ => ‘Owner Level (Booking & Service Fee)’,
    ‘name’ => ‘BZ-Owner-Level-Booking’,
    ‘type’ => ‘select’,
    ‘instructions’ => ‘Update Membership Package’,
    ‘required’ => 0,
    ‘conditional_logic’ => 0,
    ‘wrapper’ => array(
    ‘width’ => ”,
    ‘class’ => ”,
    ‘id’ => ”,
    ),
    ‘formula’ => ”,
    ‘readonly’ => 0,
    ‘choices’ => array(
    10 => ‘Standard (10%)’,
    ‘9.5’ => ‘Bronze (9.5%)’,
    9 => ‘Silver (9%)’,
    ‘8.5’ => ‘Gold (8.5%)’,
    8 => ‘Diamond (8%)’,
    ‘7.5’ => ‘Opal (7.5%)’,
    7 => ‘Ruby (7%)’,
    ),
    ‘default_value’ => false,
    ‘allow_null’ => 0,
    ‘multiple’ => 0,
    ‘ui’ => 1,
    ‘ajax’ => 0,
    ‘return_format’ => ‘value’,
    ‘placeholder’ => ”,
    ),
    array(
    ‘key’ => ‘field_5f865bca62817’,
    ‘label’ => ‘Renter Level (Booking & Service Fee)’,
    ‘name’ => ‘BZ-Renter-Level-Booking’,
    ‘type’ => ‘select’,
    ‘instructions’ => ‘Update Membership Package’,
    ‘required’ => 0,
    ‘conditional_logic’ => 0,
    ‘wrapper’ => array(
    ‘width’ => ”,
    ‘class’ => ”,
    ‘id’ => ”,
    ),
    ‘formula’ => ”,
    ‘readonly’ => 0,
    ‘choices’ => array(
    15 => ‘Standard (15%)’,
    14 => ‘Bronze (14%)’,
    13 => ‘Silver (13%)’,
    12 => ‘Gold (12%)’,
    11 => ‘Diamond (11%)’,
    10 => ‘Opal (10%)’,
    9 => ‘Ruby (9%)’,
    ),
    ‘default_value’ => false,
    ‘allow_null’ => 0,
    ‘multiple’ => 0,
    ‘ui’ => 1,
    ‘ajax’ => 0,
    ‘return_format’ => ‘value’,
    ‘placeholder’ => ”,
    ),
    array(
    ‘key’ => ‘field_5f890f5954ffa’,
    ‘label’ => ‘Earned Points’,
    ‘name’ => ‘earned_points’,
    ‘type’ => ‘number’,
    ‘instructions’ => ”,
    ‘required’ => 0,
    ‘conditional_logic’ => 0,
    ‘wrapper’ => array(
    ‘width’ => ”,
    ‘class’ => ”,
    ‘id’ => ”,
    ),
    ‘default_value’ => 0,
    ‘placeholder’ => ”,
    ‘prepend’ => ”,
    ‘append’ => ”,
    ‘min’ => ”,
    ‘max’ => ”,
    ‘step’ => ”,
    ),
    ),
    ‘location’ => array(
    array(
    array(
    ‘param’ => ‘user_form’,
    ‘operator’ => ‘==’,
    ‘value’ => ‘edit’,
    ),
    ),
    ),
    ‘menu_order’ => 0,
    ‘position’ => ‘acf_after_title’,
    ‘style’ => ‘default’,
    ‘label_placement’ => ‘top’,
    ‘instruction_placement’ => ‘label’,
    ‘hide_on_screen’ => ”,
    ‘active’ => true,
    ‘description’ => ”,
    ));

    endif;

    I want to display the selected value something like this
    Display program

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

You must be logged in to reply to this topic.