Support

Account

Home Forums General Issues Trying to check for number Reply To: Trying to check for number

  • Hi @vgledhill

    The text field will save its values as strings.
    For the case of the number field, you can get the raw database value by assigning a false parameter to the get_field() like so:

    $value = get_field('fieldname',false,false);
    

    You can also use casting within the acf/format_value to ensure that the values are loaded in a particular format: https://www.advancedcustomfields.com/resources/acf-format_value/