Attributes Type Field? #19

Closed
opened 2016-07-22 16:27:08 +00:00 by paolavness · 2 comments
paolavness commented 2016-07-22 16:27:08 +00:00 (Migrated from github.com)

Hi Llewellyn, hope this finds you well!
One of my views has a large number of 'yes/no' questions and option fields. I would like to store these in an attribs type field - IE, as a single json string in the database rather than many different fields. Wondering if CB caters for this and if so, if you can please point me in the right direction.

Thank-you, hope you have a great weekend!

Warmly,
Paola

Hi Llewellyn, hope this finds you well! One of my views has a large number of 'yes/no' questions and option fields. I would like to store these in an attribs type field - IE, as a single json string in the database rather than many different fields. Wondering if CB caters for this and if so, if you can please point me in the right direction. Thank-you, hope you have a great weekend! Warmly, Paola

Hi Paola

Yes CB actually can do that, but it will requirer custom coding.

There is a few ways to approach this, one can be that you use CB to setup the fields, and it will then add the field to the data base and load it in the back-end from all those fields.

Yet as you will see there is a params field (default) added to all tables, so to store data in that field/column when you clicked save, there is a function called "Add PHP (save Method)" in the Admin Views where you can combine these fields into one and store the json in the params column.

Then there is the ajax method of adding the field dynamically and storing them dynamically. I think there is some explanation of the ajax concept in the tutorials.

Hi Paola Yes CB actually can do that, but it will requirer custom coding. There is a few ways to approach this, one can be that you use CB to setup the fields, and it will then add the field to the data base and load it in the back-end from all those fields. Yet as you will see there is a params field (default) added to all tables, so to store data in that field/column when you clicked save, there is a function called "Add PHP (save Method)" in the Admin Views where you can combine these fields into one and store the json in the params column. Then there is the ajax method of adding the field dynamically and storing them dynamically. I think there is some explanation of the ajax concept in the tutorials.
paolavness commented 2016-07-26 06:40:22 +00:00 (Migrated from github.com)

Cool Llewellyn, thanks for this!

Cool Llewellyn, thanks for this!
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#19
No description provided.