Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Multi Select - Check boxes 29 Jun 2016 17:16 #14110

Hi,
I need some help with a multi selection form field.

I see the posts pointing us to www.j-cook.pro/index.php/r/relations - but I don't understand.

Attached is my database schematic. For the Pollutant_storage_type field I would like a group of checkboxes so the user can select one or more values - such as "Wet", "Dry", "Online", "Offline".

Can somebody point me in the right direction?

(PS: it would be helpful if this forum allowed png and jpg files)
Just call me Chris :)
Attachments:

Please Log in or Create an account to join the conversation.

Multi Select - Check boxes 29 Jun 2016 18:10 #14111

Hi,

You have to create a link-table.
From your schema you have a FK (Pollutant_storage_type) directly linked to an ID in Pollutant_storage_types.
Therefore, you can only choose 1

Steps:
- Remove FK from devices table
- Create a table devices_storagetypes
- In there put an FK to devices and an FK to pollutant_storage_types
- Edit the collection view(s) if needed (there should be a cross table now, you might need to refresh the builder)
- Edit the item view(s), drag the relation to the form

This does not create a set of checkboxes however, this creates a multiple select (like the tags in Joomla)
The following user(s) said Thank You: organicwebs

Please Log in or Create an account to join the conversation.

Multi Select - Check boxes 04 Jul 2016 10:08 #14124

Thanks Romkabouter - that works well.

For others also trying to do this ... attached is an updated schematic...
Just call me Chris :)
Attachments:

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.077 seconds

Although I found this tool some time ago I just started learning experimenting and building this first component on Monday and now on Thursday afternoon it's already online. Although I already had a working version done with another tool this is much easier to build and at the end you have the freedom to own your own component. Once you know how to use Cook you will boost your productivity as the learning curve is really moderate compared to many other tools.
Giori (Forum)

Get Started