Use an existing content type or create a new one. You should be familiar with this process before proceeding, if not check out the
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)
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). Next, filter to see the fields of type button, I used the Button Field
Create Repeating Content Type
Save and close the form!!
Create a new content type, call it what you want, add whatever fields you want, though start safe and easy with a text field, and get crazy when you're ready. I created a content type called
Yum, from blank, base upon Article Object type, and added two fields, both with the padlock open and both with "storage: none" (image: add-fields-yum-contenttype-nachos) as the GroupX field will handle the storage instead (you can try with the padlock closed, see what difference, not sure myself). I added a text field "title: Nachos", and an image field "title: Jalapenos", (image: add-fields-yum-contenttype-jalapenos), I did not change any settings for this image field. You do not need a submit button as the Trevor form will handle that, just have the two fields (image: yum-contenttype-fields).
Create GroupX Field
Save and close the
Yum form and open the Trevor Form. The next step is to add a GroupX field to the Trevor content type which will allow the user to add multiple times the Yum content type. I gave it "title: Mexico GroupX", "name: mexicogx". Storage for GroupX is like this:
Format / Object: CUSTOM | 'Object' | db_column_name[machine_name_of_repeating_content_type]<br>
So for this example it would be
Format / Object: CUSTOM | Article | mexicogx[yum]<br>
(image: add-groupx-field) (note: 'mexicogx' is the db column name and also the groupx name. They do not have to be the same!!)
Save the form! In Joomla! admin menu, select menus, main menu. After page loads click new. Select the menu item type of SEBLOD, then Form. Choose the content type Trevor. The Menu Title will auto-populate with Trevor. Save!! Head to the front end of the site, navigate to the newly created menu item (Trevor) and enter some values to your Trevor Form which should (fingers crossed) contain the GroupX fields (image: add-content-trevor). I added "title: We All Worship Mexican Food", I selected a category, and I added two sets of the Yum content type using GroupX. (image: db-groupx-stored-data). A new table was created extending the #__content table with specific reference to the Trevor Content Type: #__cck_store_form_trevor. In the table is the id of the article (20 in this case for me) and the groupx data stored in Seblod syntax in the db column defined by the storage settings when we set up the GroupX field (image: add-content-trevor).
BE AWARE: The GroupX Field does not carry over any settings stored in the content type you are repeating, like class, or live values etc...
Note: When I am more clued up I will extend this post with details on how to call the values stored by a GroupX.