Sortable Multiselect field

More
10 years 6 months ago #47644 by rubenreyes
Hello,

I was wondering if you have a way for adding a "sortable multiselect" field to be used in Category template settings.

Here is what we want to accomplish: from the category settings we want to be able to control the order in which some elements are rendered. We have created a multiselect field with some fixed options in it. We would like to have some JS code around it that allows to sort the options, and also that selects all options upon submit (so that the complete list is saved)

We tried using the element multilist.php but it doesn't seem to be working (we are on Joomla 3.2 and FC 2.1.3)

Please let me know if you have something that can be used for this purpose of if we should develop our own.

Thank you!
Attachments:

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

More
10 years 6 months ago #47651 by ggppdk
Replied by ggppdk on topic Sortable Multiselect field
Hello

i don't see Joomla having such a FORM element, maybe there is one available online but ... i think it is easy (see alternative 2 below ...)



in v2.2.0 we converted the filters element to do exactly what you ask, a single select fields adds elements into an a sortable area

administrator/components/com_flexicontent/elements/filters.php


So we have these choices:
1. remove DB code from filters.php element and combine it's code with:

administrator/components/com_flexicontent/elements/multilist.php

to make such a field


2. or add jQuery select2 + JQuery select2 sortable plugin to
administrator/components/com_flexicontent/elements/multilist.php


number 2 sounds like the best and fastest choice ?


Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
10 years 6 months ago #47668 by micker
Replied by micker on topic Sortable Multiselect field
choiuce 2 !

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
10 years 6 months ago #47717 by rubenreyes
Thank you for the suggestion jQuery Select2 seems to have what we need.

I just noticed that when I make the field of type "multilist" in our xml, we get the following error:
Code:
PHP Fatal error: Call to undefined method SimpleXMLElement::data() in /srv/www/.../public_html/administrator/components/com_flexicontent/elements/multilist.php on line 87, referer: http://.../administrator/index.php?option=com_flexicontent&view=categories

line 87:
Code:
$text = $option->data();

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

More
10 years 6 months ago #47719 by ggppdk
Replied by ggppdk on topic Sortable Multiselect field
Hello

this is a J1.5 fields which can do a few more things that Joomla 2.5 built-in form field "groupedlist", will update field in next couple of commit so that it can be used,

at some point we wondered if we need this field or not, but i see we need something more poweful than Joomla's "groupedlist" form field element


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
10 years 6 months ago #47736 by rubenreyes
I was looking into jQuery select2 at ivaynberg.github.io/select2/ and it is amazing. I was wondering if we could do a Joomla field that takes advantage of all its different settings, so that we get the most out of it.

Maybe one or more of the XML attributes can be used for passing the js configuration.

We are happy to help.

By the way, I think you will like the template we are developing a lot. It is intended for advanced developers.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.499 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline