Support

Account

Home Forums Front-end Issues Logical condition between two fields + True / False Reply To: Logical condition between two fields + True / False

  • Great John! It was just what I was looking for but only that my dynamic was much more confused.

    I take this opportunity for a further question of this functionality.

    Using the same condition but also adding Field C as the third variable

    I’m trying this:

    <?php
    	$value_a = get_field('warning_limit');
    	$value_b = get_field('closing_limit');
    	$value_c = get_field('number_members');
    	if ($value_c >= $value_a) {
    	echo("Limited tickets");
    	}
    	elseif ($value_c == $value_b) {
    	echo("Tickets sold out");
    	} else {
    	echo("Tickets available");
    	}
    ?>

    Except that the second part is not working at the moment, I certainly did something wrong