Welcome, Guest
Username: Password: Remember me

TOPIC: Multi Select - Check boxes

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

  • organicwebs
  • organicwebs's Avatar
  • Offline
  • Premium Member
  • Chris
  • Posts: 111
  • Thank you received: 19
  • Karma: 8
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)
Attachments:
Just call me Chris :)
The administrator has disabled public write access.

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

  • Romkabouter
  • Romkabouter's Avatar
  • Online
  • Elite Member
  • Posts: 281
  • Thank you received: 118
  • Karma: 46
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 administrator has disabled public write access.
The following user(s) said Thank You: organicwebs

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

  • organicwebs
  • organicwebs's Avatar
  • Offline
  • Premium Member
  • Chris
  • Posts: 111
  • Thank you received: 19
  • Karma: 8
Thanks Romkabouter - that works well.

For others also trying to do this ... attached is an updated schematic...
Attachments:
Just call me Chris :)
The administrator has disabled public write access.
Time to create page: 0.058 seconds

Get Started