Support

Account

Home Forums Front-end Issues Radio field conditional in afc_form? Reply To: Radio field conditional in afc_form?

  • get_field(‘chon’) is not going to work here.

    
    
    if(get_field('chon') == 'a') {
        $title = $_POST['fields']['field_5558a08e10eed'];
        $content = $_POST['fields']['field_555ddb4112814'];
    }
    else if (get_field('chon') == 'b') {
        $title = $_POST['fields']['field_555efea0f3e01'];
        $content = $_POST['fields']['field_555efed7f3e02'];
    }
    

    Your function is called before the field is saved, so it will have no value.

    Your accessing the value for the title and content the correct way, you” need to access the value of ‘chon’ the same way.