Difference between revisions of "Related Custom Fields"
(Created page with "There are 3 types of custom field relations built-in: * '''field option => field option''' * '''field option => field''' * '''field option => field group''' == field option => ...") |
|||
Line 1: | Line 1: | ||
− | + | __TOC__ | |
− | + | ||
− | + | ||
− | + | ||
+ | JReviews offers 3 different types of custom field relations. | ||
− | == | + | == Field option to Field option == |
With this relation, when you select a field option of the parent custom field, all fields that contain child field options will appear. | With this relation, when you select a field option of the parent custom field, all fields that contain child field options will appear. | ||
Line 19: | Line 17: | ||
− | == | + | == Field option to Field == |
With this relation, when you select a field option of the parent custom field, all child fields will appear. | With this relation, when you select a field option of the parent custom field, all child fields will appear. | ||
Line 32: | Line 30: | ||
− | + | == Field option to Field group == | |
− | == | + | |
With this relation, when you select a field option of the parent custom field, all child field groups will appear. | With this relation, when you select a field option of the parent custom field, all child field groups will appear. | ||
Line 42: | Line 39: | ||
[[File:FieldGroupRelation.png]] | [[File:FieldGroupRelation.png]] | ||
− | |||
Revision as of 10:45, 14 February 2019
JReviews offers 3 different types of custom field relations.
Field option to Field option
With this relation, when you select a field option of the parent custom field, all fields that contain child field options will appear.
This relation is useful for connecting Country, State and City custom fields, you don't need to create one state field per country and one city field per state. Only 3 custom field are required because we are connecting field options.
For example, the 'United States' field option of jr_country custom field will be saved as Control Value for 'California' field option of jr_state custom field which will be saved as Control Value for 'Los Angeles' field option of jr_city custom field.
The relations are assigned on the Field Options Manager of the child custom field. For example, when we add a new option for the City custom field, we need to assign the Control Value:
Field option to Field
With this relation, when you select a field option of the parent custom field, all child fields will appear.
This relation is useful when you want a child custom field to appear with all its values after parent field option is selected.
For example, if you decided to create a different state field for each country, you can assign a 'jr_usstates' custom field to 'United States' field option of the jr_country custom field and the state field will always show all its options.
Another example is to show additional custom field with Restaurant Meals only after Yes value has been selected for the parent Food custom field. In this case the Control Value is assigned to the custom field on the field Add/Edit screen:
Field option to Field group
With this relation, when you select a field option of the parent custom field, all child field groups will appear.
This relation is useful when you want a whole field group to appear with all its fields after parent field option is selected.
For example, if you have a 'Cuisine' custom field with field options 'French', 'Italian', etc., you can create a field group for each of those field options that will show fields with more details about the particular cuisine. In this case the Control Value is assigned to the field group in Field Groups Manager:
For more details, watch the video about custom field relations:
Related Fields (6:26 min.)