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
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.