Column Settings: Relationship
This setting consists of 9 pre-set relationship types selectable in a <select> list/input. Each relationship describes how a dependent dropdown is linked to is its trigger (as previously described). The 9 present data relationships types are:
- None: This is only valid for the first dropdown. The explanation for this is the same as the one given for a 0 value for the trigger of for the first dropdown.
- Child: The dependent dropdown data are the children of the page selected in the trigger dropdown.
- Parent: The dependent dropdown data is the parent of the page selected in the trigger dropdown.
- Page: The dependent dropdown data are the pages that use the template selected in the trigger dropdown.
- Group: The dependent dropdown data are the pages that have the page selected in the trigger dropdown in their named pagefield (similar to what pages use the category X?)*.
- Field: The dependent dropdown data are the fields present in the page selected in the trigger dropdown.
- Value: The dependent dropdown data are the values of the named-field of the page or field selected in the trigger dropdown.
- User: Property: The dependent dropdown data are the properties (basically fields) for the user selected in the trigger dropdown.
- User: Value: The dependent dropdown data are the values of the named-field of the selected user or selected property in the trigger dropdown.
Please note that not all relationships for a given trigger are valid for the relationship of the dependent dropdowns. For instance, a dropdown whose relationship is set as Field cannot be a trigger for a dropdown who relationship is specified as Child. Logically, it would not make sense. A ProcessWire field cannot have children! All invalid relationship and trigger situations are discussed in a later topic.
Please also remember that relationships are always described as how is the dependent dropdown connected to its trigger dropdown?
*For instance, a trigger dropdown named sizes might be populated with pages denoting the size of clothes, i.e. Small, Medium, Large. Its dependent dropdown named colours would have a relationship defined as Group and for its data source, some pagefield (e.g. one called tshirt_sizes). Selecting, for instance, the value Medium in the trigger dropdown sizes would initiate a ProcessWire find for pages that have the page Medium selected in their pagefield tshirt_sizes and populate the dependent dropdown colours with the results (e.g. Red, Blue, Yellow), meaning, there are T-shirts of these colours for the size Medium.