groupedlist field not rendered #450
Closed
opened 2019-07-24 11:03:59 +00:00 by marcodings
·
9 comments
No Branch/Tag Specified
6.x
5.x
4.x
3.x
v6.2.0
v5.2.0
v4.2.0
v6.1.6
v5.1.6
v4.1.5
v6.1.5
v5.1.5
v4.1.4
v6.1.4
v5.1.4
v4.1.3
v6.1.3
v5.1.3
v6.1.2
v5.1.2
v4.1.2
v5.1.1
v4.1.1
v4.1.0
v3.2.5
v5.1.0
v5.0.3
v4.0.3
v3.2.4
v5.0.2
v4.0.2
v3.2.3
v5.0.1
v4.0.1
v3.2.2
v5.0.0
v4.0.0
v3.2.1
v3.2.0
v3.1.28
v3.1.27
v3.1.26
v3.1.24
v3.1.19
v3.1.17
v3.1.15
v3.1.12
v3.1.11
v3.1.10
v3.1.9
v3.1.8
v3.1.7
v3.1.6
v3.1.5
v3.1.4
v3.1.3
v3.1.2
v2.13.1
v2.13.0
v2.12.16
v2.12.15
v2.12.14
v2.12.10
v2.12.9
v2.12.8
v2.12.7
v2.12.6
v2.12.4
v2.12.3
v2.12.2
v2.11.7
v2.11.4
v2.11.3
v2.11.2
v2.11.0
v2.10.13
v2.10.11
v2.10.9
v2.10.5
v2.10.1
v2.10.0
v2.9.21
v2.9.18
v2.9.14
v2.9.11
v2.9.10
v2.9.8
v2.9.7
v2.9.1
v2.9.0
v2.8.5
v2.8.4
v2.8.2
v2.8.0
v2.7.10
v2.7.7
v2.7.6
v2.7.5
v2.7.4
v2.7.1
v2.7.0
v2.6.17
v2.6.16
v2.6.15
v2.6.14
v2.6.13
v2.6.12
v2.6.11
v2.6.10
v2.6.9
v2.6.8
v2.6.7
v2.6.6
v2.6.5
v2.6.3
v2.6.2
v2.6.1
v2.6.0
v2.5.8
v2.5.6
v2.5.5
v2.5.4
v2.5.1
v2.5.0
v2.4.10
v2.4.9
v2.4.8
v2.4.7
v2.4.6
v2.4.5
v2.4.4
v2.4.3
v2.4.2
v2.4.1
v2.4.0
v2.3.10
v2.3.9
v2.3.8
v2.3.7
v2.3.6
v2.3.5
v2.3.4
v2.3.2
v2.3.1
v2.3.0
v2.2.10
v2.2.9
v2.2.6
v2.2.5
v2.2.4
v2.2.3
v2.2.2
v2.2.0
v2.1.21
v2.1.20
v2.1.19
v2.1.18
v2.1.17
v2.1.16
v2.1.14
v2.1.13
v2.1.12
v2.1.11
v2.1.10
v2.1.9
v2.1.8
v2.1.7
v2.1.6
v2.1.5
v2.1.4
v2.1.3
v2.1.2
v2.1.1
v2.1.0
v2.0.9
v2.0.8
No labels
enhancement
Milestone
No items
No Milestone
Major improvement to core (speedup production)
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#450
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Steps to reproduce the issue
groupedlistExpected 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
groupedlistso 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
groupedlisthas 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
prepFormTypeOkay 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
groupedlistand 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.