Support

Account

Home Forums General Issues True/False field never evaluates to true Reply To: True/False field never evaluates to true

  • Hi @john.marcello

    I suspect the issue is that you are using teh get_field function within a repeater loop, when you shoudl be using get_sub_field instead!

    Could that explain the issue?

    @astrixoblix – the get_field function will return a true / false without the 2 ‘false’ parameters. In fact, the value saved into the DB is either ‘1’ or ‘0’, so it is best to loosly compare like so:

    
    if( get_sub_field('field_name') ):
    

    Thanks
    E