In a form, a user selects a "Trigger Type" post from a Generic Select field.
I want to create a Conditional Group based on the Trigger Type selected.
I eventually figured how to write a condition that checks for a specific selection. I found that I have to check for the post ID like this:
( $(trigger-types-lookup) eq '2364' )
However, there will be a large number of possible Trigger Types, and what I really want to check for is not the ID of the Trigger Type post, but title of a post that is in the relationship "Asset of Trigger Type" with it. That will require far few conditional fields.
I can't find any Toolset features that will help me do this, so I'm expecting to write a shortcode. So, the condition in the Conditional Group would be something like:
( [my_shortcode ... ] eq 'Membership' )
So that the Group will be shown only if the selected "Trigger Type" has an "Asset of Trigger Type" relationship with the "Asset" post whose title is "Membership".
My problem is I don't know how my shortcode php can access the required information in the form.
1) Is there some Global variable that contains the current values of the fields in the form?
OR
2) Is there some way I can pass the ID of the selected "Trigger Type" using attributes?
e.g.
( [my_shortcode trigger_type_ID=???? ] eq 'Membership']
... where I want ??? to be, in effect, $(trigger-types-lookup)
Is this possible?
Thanks
Alex