Form checks but not databasejoin

mariluzrm

Member
Hello,

How can I do the following: I have a table in my database of Components and each component has one or several Elements_Types.

So I have 3 tables: Components (Entity), Element_Types (Entity), and Component_ElementsTypes (Relationship between the two previous tables).

I would like a form for each component in which the Elements_Types are checkboxes, and only those indicated in the 'Component_ElementsTypes' table are checked.

I know it could be done with a databasejoin, and a field would be created in the Components table called 'Element_Types' of type Text, and it would be filled in as ['1', '3', '10', '31']. But I don't want this; I want checkboxes while still using the intermediate table 'Component_Elements'.

Is this possible?

Thank you
 
I know it could be done with a databasejoin, and a field would be created in the Components table called 'Element_Types' of type Text, and it would be filled in as ['1', '3', '10', '31'].
No, this is a checkbox element.

A databasejoin rendered as checkbox will use an additional table
your-main-table_repeat_your-dbjoin-element with structure id, parent_id, your-dbjoin-element, params

So depending on what you want to do (display only? modify the relation? one-to-many? many-to-many?) you can use e.g. a mySql view "mapping" your relationship table to the dbjoin-checkbox table (readonly) or use list joins https://fabrikar.com/forums/index.php?wiki/list-joins/ or use php plugins (onLoad/onSave) to copy values.
 
Hello.
Component_ElementsTypes (Relationship between the two previous tables) is many-to-many and I want to modify the relation. How can I do it then?
Thanks.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top