Welcome, Guest
Username: Password: Remember me

TOPIC: Checkbox Group for Relations

Checkbox Group for Relations 03 Dec 2015 15:26 #13716

  • MorganL
  • MorganL's Avatar
  • Offline
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
  • Karma: 15
Has anyone put together a checkbox group yet using the FK relations fields as opposed to the (rather nice) mutliple choice selector.

I only ask as one particle field I have will benefit greatly from checkbox group.. which BY DEFAULT will have them all selected when creating a new item.. difficult to do I think with the multiple selector.. unless of course anyone knows how to make it so when I do a new item, any FK Relations multiselect field will select everything BY DEFAULT?
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla
The administrator has disabled public write access.

Checkbox Group for Relations 10 Dec 2015 09:45 #13737

  • Romkabouter
  • Romkabouter's Avatar
  • Offline
  • Elite Member
  • Posts: 310
  • Thank you received: 131
  • Karma: 48
Actually, I did this recently.
I cannot put some code right now, but will soon, I did not have every box checked by default though.

I see the topic is a week old, did you make some progress?
The administrator has disabled public write access.

Checkbox Group for Relations 10 Dec 2015 10:13 #13738

  • MorganL
  • MorganL's Avatar
  • Offline
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
  • Karma: 15
Fortunalty the standard select box interpretation was well received so I didnt have to invest any time in it, but if you do get time to share i would love to see how you did it
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla
The administrator has disabled public write access.

Checkbox Group for Relations 10 Dec 2015 14:21 #13740

  • Romkabouter
  • Romkabouter's Avatar
  • Offline
  • Elite Member
  • Posts: 310
  • Thank you received: 131
  • Karma: 48
Hi,

My file is attached.

Some remarks:
- Put this file in admin\comp\fork\model\fields (rename to .php)
- override the form field (see below)
- you porbalby nee do some rework to get it working your component, but that is not the hard part
- not checked by default (didn't put any effort in it yet)
- its a quick hack. It probably has bugs/not used code

You can override the field (www.j-cook.pro/index.php/f/forks. Read the part about xml field)
You will have something like:
<?xml version="1.0" encoding="utf-8"?>
<form>
	<fieldset name="group.form" addfieldpath="/administrator/components/com_fidelity/fork/models/fields">
		<field name="facilitators"
				alias="id"
				label="FIDELITY_FIELD_FACILITATORS"
				filter="array"
				type="mycheckboxes"
				multiple="true"
				labelKey="name"/>
	</fieldset>
</form>

Note the "fork" part in addfieldpath.
Put that xml file in admin/comp/fork/models/forms/

My screenshot below (dutch): Facilitators is the checkboxes, users is a normal relation field.


Hope you can use it :)

Paul
Attachments:
Last Edit: 10 Dec 2015 14:23 by Romkabouter.
The administrator has disabled public write access.
The following user(s) said Thank You: MorganL

Checkbox Group for Relations 12 Aug 2016 22:46 #14419

  • MorganL
  • MorganL's Avatar
  • Offline
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
  • Karma: 15
Can you reattach the file... i finally got around to needing a checkbox group, came back here knowing it was solved... and the file is saying not found;

Unless admin can restore it?
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla
The administrator has disabled public write access.

Checkbox Group for Relations 13 Aug 2016 13:59 #14423

  • Romkabouter
  • Romkabouter's Avatar
  • Offline
  • Elite Member
  • Posts: 310
  • Thank you received: 131
  • Karma: 48
Sure, this is the original so you have to adapt it a bit :)
Attachments:
The administrator has disabled public write access.

Checkbox Group for Relations 13 Aug 2016 14:00 #14424

  • Romkabouter
  • Romkabouter's Avatar
  • Offline
  • Elite Member
  • Posts: 310
  • Thank you received: 131
  • Karma: 48
Hmm, I think this is a different one, but still usable I think.

I use this exact file for checkboxes on an online entry form :)
The administrator has disabled public write access.
The following user(s) said Thank You: MorganL

Checkbox Group for Relations 13 Aug 2016 22:01 #14425

  • MorganL
  • MorganL's Avatar
  • Offline
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
  • Karma: 15
Appreicate the repost, will try this tomorrow morning!
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla
Last Edit: 13 Aug 2016 22:02 by MorganL.
The administrator has disabled public write access.
Time to create page: 0.070 seconds

Get Started