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:
</if>With a multi-select, type-ahead, or check-box in use, display template code could look like this:
<if test="is_array($data['record']['myfieldkey']) && count($data['record']['myfieldkey'])">
<foreach loop="$data['record']['myfieldkey'] as $id => $recordData">
</if>record_title is the field that was selected for input's value.
Welcome to DevFuse Forums
- Start new topics and reply to others
- Subscribe to topics and forums to get email updates
- Get your own profile page and make new friends
- Send personal messages to other members.
Guest Message by DevFuse
(View All Products)Featured Products
Help fund your forum with donations, setup goals and track member donations. Offer rewards for members donating.
Have your members submit their race times and share with others.
Allows your members to submit their own videos for community viewing. Support is included for all the major video sites.
Build your own forms for your members without coding experience. Support included for pm, email and topics.
Build a community database of items for your members. Full features custom fields included.
[IPS] Content Relational Records Field
No replies to this topic