Forums › Forums › Search & Filter Pro › Conditional Logic
Tagged: Conditional logic, gravity form, pods, taxonomy
- This topic has 14 replies, 2 voices, and was last updated 7 years, 9 months ago by
Trevor.
-
Trevor(Private) October 6, 2017 at 10:46 am #135091
True conditional logic is not an advertised feature of our plugin. However, it does support Quasi conditional logic, which is what most sites use.
Let me take the example of your two taxonomies (they must be two separate taxonomies, and not one taxonomy with multiple parent/child relationships – if you have done this, it can easily be changed into two taxonomies); Provinces and Towns.
When the page with the form opens, both fields would be visible, populated with all possible variations of terms.
When the user makes a selection in the Province field, the Town field updates to show only the towns in that province. Also, if the user selects a town first, the Province field would update to show the correct province.
This is done by:
1. Enabling (ON) the two Auto Count settings in the General Settings tab, and
2. On each field, set Hide Empty to ON.We do it this way because WordPress does not maintain referential data integrity in its database, which is what is required for True Conditional Logic (although it can be faked). Instead the ‘joins’ are in each post where you select terms for each field and thus create the ‘link’.
Anonymous(Private) October 9, 2017 at 10:30 am #135469Ok I’ve made the change as you suggested but now we are back at only showing the title in the result instead of the image, name and location too. https://skillscoach.co.za/search-page/
Trevor(Private) October 9, 2017 at 11:03 am #135476Then if you are using our results.php, you can use php to print out the values individually:
Anonymous(Private) October 9, 2017 at 11:11 am #135478I tried that and I just could not get it to work – my knowledge of php is very limited, that’s why someone in Pods’ slack channel suggested using the shortcode. I didn’t realise it was going to be so complicated to get the same result you get in your demo video.
Anonymous(Private) October 9, 2017 at 11:45 am #135487ok great, thank you for the link. So that will mean it doesn’t get overwritten by an update.
I am still confused as to why it loaded the posts as I want them to look (with the shortcode I added) on the results page but not after I do a search. Do I need to add my shortcode somewhere else to show the results like this too?
-
AuthorPosts