This Hook and field source will add a single IP.Content field type that is an advanced usage database relational field.
The selected field to use will be used for input only, the value of this field is always an ARRAY of 'record' data, you should NEVER select to show this field in listing or display and manually show the data you wish to show in the templates, as such, there is no field preview available.
You should never use this as a title or body field. You should never use this field's topic posting options.
If the selected field input type is a drop-down, the value will be a single-dimensional array of 'record' data from the selected 'record' with all other field types parsed, the field data there-of, the category(if any) data, and the data of the database pulled.
If the selected field input type is not a drop-down, the value will be a multi-dimensional array of 'records' data from the selected 'records' with all other field types parsed, the field data there-of, the category(if any) data for each record, and the data of the database pulled.
Available field input types are drop-down, multi-select, type-ahead, and check-box.
Check-box is designed In a Show/hide set of h3 tags and div's, will be the database name if no categories are present in the selected relational database in one header, will be grouped by the category name of the records to pull if categories are used in the selected relational database.
All Check-box div's default to not-expanded(hidden) to keep the form clean, and open with a click on the header.
With a drop-down in use, display template code could look like this:
{$data['record']['myfieldkey']['record_title']}
With a multi-select, type-ahead, or check-box in use, display template code could look like this:
{$recordData['record_title']}
record_title is the field that was selected for input's value.
Known issues/bugs. The attachments field type is directly incompatible with this field due to string functions being performed in the source code.
View the full article IPS Resources