groupedlist field not rendered #450
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#450
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Steps to reproduce the issue
groupedlist
Expected result
field to show up in the form XML ( and eventually the edit view)
Actual result
field is not rendered to the XML, nor is it listed in $tabLayoutFields in the model
Jackpot... you found the fieldtype that is not yet in JCB, and will not work.
This simply because I could not yet see how we will map it in the current subform field properties approach.
Give me some screenshots and explanation how you think this can work.
Took you long enough.... lol
Yeah please mock me ;)
I don't understand what you are asking here. I do not see the implications for subformfield..
My Usecase: I have it in use in on one place atm. I have the field entered as a normal listfield and i manipulate the xml to change the type to groupedlist. The "options" i build dynamically.
I have not looked into how the field would be initialised statically in th fieldtype.
That is my point exactly... each fieldtype is build of the bases of a set of properties we set in a subform called properties:
So how to map the
groupedlist
so it also works is the help I need. Does not help to overwrite everything (that JCB does), but to instead adapt JCB so that it is able to build it out of the box like it does the other fieldtypes.So I need help with the approach, since the
groupedlist
has more complex option listing design... so how will we list those fields per/group in the current subform/properties of the fieldtypes in JCB.Solve that and we will have the
groupedlist
👍In the joomla documention the groupedlist (documentation) only differs from the list on the
I have a "list" field with the approriate listfield options which i change to type "groupedlist" in the xml. That works as a charm. I dymacally populate the options.
So afaik we can just start with the "list" options and we are good.
I think the Joomla documentation on "groupedlist" is incomplete. I'll do some code inspection to see what gives.
I see the following atributes in the code:
( there is no useglobal)
As for defining the grouped list i have used the following format in a textarea
This resembles the "normal" list options definition. In my context i stored the definition in a global component option to be used to build the formfield dynamically in the getform for the model.
So i guess this code can be used in interpreting the formfield in jcb and build the XML
entrypoint is
prepFormType
Okay I changed the convention a little so to make it easier I hope... so to declare options and groups it is done the following way:
So when we declare a group we use two at
@@
and no pipe|
in the string and after the@@
the group unique ID like thisGroup Name@@1
. When we add options to a group we use the normal options way, just now with two pipes|
and the group ID at the end like this3|Option 3|2
.You can also mix them up like this:
If you use only one pipe
|
or no pipe in the option string then the option will not be added to a group but act like an independent option.I will add this new field type to JCB but to add it to existing installs of JCB you will need to copy/save as copy the list fieldtype and add the following to the options row as the new default:
Then update the fieldtype name to
groupedlist
and other details to what is found here in the documentation on Joomla.Well let me know how this works. Be sure to test both implementations string manipulation and simplexml in relation to the field builder.