Field Dependency Option – how to hide fields e.g. when you select “Vehicle Type” -> Bike – hide “Doors” field
Set up a Vehica taxonomy field so that picking one of its options hides the fields that do not apply — choose “Bike” as the Vehicle Type, and “Doors” disappears from the search form and the submit form.
1 minute read
In this walkthrough we create a new “Vehicle Type” taxonomy field, add a “Bike” option to it and hide the fields that make no sense for a bike — “Doors”, for example.
Create the field and turn on field dependency
-
1
Create the “Vehicle Type” field
In Vehica Panel > Custom Fields, type the field name in the Add new field box, choose Taxonomy as the type and click ADD NEW FIELD.
-
2
Move the field to the top and edit it
Drag the new field to the top of the list with the handle on its left, then click EDIT on its row.
-
3
Tick “Fields dependency”
In the field settings, enable Fields dependency and save.
-
4
Open the taxonomy and add the “Bike” option
The field now has its own entry under Vehicles in the WordPress menu.
Add the field to the search form and the inventory
Now add the field to the main search form:
Repeat the same on the inventory search form:
Add a bike and test it
Add your first bike and set its Vehicle Type to Bike:
Then test the new type on the search form:
And on the front-end Submit Vehicle panel:
Ask the people who build Vehica
We answer by email from support@tangiblewp.com. With Premium Support, we also fix your site when something breaks.
We can also run your site for you, or build a new one.
Was this guide helpful?