1283 Posts
Bucklash
9 years ago
0
Topic

Hi, this post is a supplementary guide to help those understand the Field GROUP

Check out  Learning::Fields::GroupX, and Learning::Fields::FieldX



    

Content Type 

Use an existing content type or create a new one. You should be familiar with this process before proceeding, if not check out the Seblod resources. The content type I am creating is based upon the Article Object (image: create-contenttype-articleobject). "Title: Trevor", "machine name: trevor" (image: create-contenttype-trevor)

image: create-contenttype-articleobject:

image: create-contenttype-trevor

 

Add Fields

In the Site Form View I added the default Admin From View fields using a shortcut - click the downward facing chevron underneath the column of numbers. When you hover over the chevron you will see a tooltip saying what it does: "Assign fields form Admin From view". Click it!! (image: assign-fields-shortcut). Using the select list in the available fields column, if you filter the available fields by "field type: group" you will see pre-made group fields. I used Group Field Article Grp Publishing . (image: add-field-group) Next, filter to see the fields of type button, I used the Button Field Button Submit (image: add-field-buttonsubmit).

image: assign-fields-shortcut

image: add-field-group

image: add-field-buttonsubmit

 

Add Menu Item

Save the form!! Add a menu item, selecting SEBLOD and then selecting the option Form (image: add-menuitem-trevorform) (There are two options with Seblod: Form and List & Search)

image: add-menuitem-trevorform

Add Content

Save and head to the front end of your Joomla! site. There should be the menu link that you just created. Log in so that you can access the form. You should be able to see the default fields in your site form, plus the additional fields from the content type that the group field incorporates. Enter some data, I entered the "title: Article With Group Field, Cool". I selected a category. I added random dates to the start publishing and finish publishing fields. (image: add-articlecontent-trevorform). If you look in the database, under #__content, you will see your newly created article with the data added accordingly. (image: db-articlecontent-entry)

  image: add-articlecontent-trevorform

image: db-articlecontent-entry

BE AWARE: The Group Field does not carry over any settings stored in the content type for the fields you are grouping like class, or live values etc...

As a side note, you will also notice that Seblod has not created a new table in your database as your content type did not create any new fields. All the fields used in this example are used by Joomla! with or without Seblod. If you did have extra fields applied you would see a new table like this: #__cck_store_form_trevor or, if you created fields that were content type agnostic, ie globally accessible then you would have seen a table called: #__cck_store_item_content.To make fields global you have to open the padlock before you create the field. Padlock Closed (image: padlock-closed) means a local field, only available to that content type. Padlock Open (image: padlock-open) means a global field, available to any content type.

image: padlock-closed

image: padlock-open

Clear as mud?

Bucklash

Get a VIP membership