Difference between revisions of "Related Custom Fields"

From JReviews Documentation
Jump to: navigation, search
(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 => ...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
There are 3 types of custom field relations built-in:
+
__TOC__
* '''field option => field option'''
+
* '''field option => field'''
+
* '''field option => field group'''
+
  
 +
JReviews offers 3 different types of custom field relations.
  
== field option => field option ==
+
== 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 => field ==
+
== 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 ==
== field option => 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]]
 
  
  
  
 
For more details, watch the video about custom field relations:<br />
 
For more details, watch the video about custom field relations:<br />
[http://docs.reviewsforjoomla.com/videos/related_fields/Related_fields.html Related Fields] (6:26 min.)
+
[https://docs.jreviews.com/videos/related_fields/Related_fields.html Related Fields] (6:26 min.)

Latest revision as of 13:00, 22 July 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:

FieldOptionsRelation.png


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:

FieldRelation.png


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:

FieldGroupRelation.png


For more details, watch the video about custom field relations:
Related Fields (6:26 min.)