Conditional logic for fields - comparing two fields

I apologise for asking, but I couldn’t for the life of me find the answer when reading docs and searching Google.

I have field C that should display if the number entered in field A is less than the value of hidden field B.

For context, the hidden field B is dynamically populated with a number from the page the form is displayed on and I can see in the inspector the value is correctly populated.

I struggled to find the answer online and I had a go with merge tags, so for hidden field B: {Threshold:33}

Also tried reversing the condition, so if hidden field B was greater than user field A {:26:value}

Not really sure if I’m going about it the wrong way, any advice would be appreciated!

Conditional logic can’t be used to compare field values (at least not by default.) You can do this with the gform_field_validation filter, to compare the two fields after the page is submitted, and depending on the result, show one field or another after that comparison is made. You can find out more about the gform_field_validation filter here:

Example 5 covers comparing two fields.

Let us know if you have any other questions.