nested options in a dropdown list

sales2010

Well-Known Member
Hello,

Just want to ask if is possible to have nested options in a dropdown element and filters. This will be very useful for grouping information like categories in form. A good example about how this feature might work is Wordpress menu where i can arrange items as main categories or subcategories.

Or if anyone know other idea about how can i display a dropdown like this in form:

First category
|-First Subcategory
|--First Sub sub category
Second category
|-Second Subcategory

Thank you

P.S: speaking about Wordpress, when i made a modification to an article or menu and i want to leave the page, i will see a message that ask me to confirm this action. Might be a good idea to have it here also, to ask for a final action before leave the page?
 
Hi,

No, it's not possible to have a nested options in your dropdown (or I'm not aware of it) in your form. But you can arrange it in an other way...

After a 1mn reflexion, I'd say that you should make multiple elements dropdown, display them inline in css so that the user can understand what you mean (and arrange other stuff, I don't know your form). With some js, you can disable other dropdowns selects if one is selected. Finally, using a php plugin on your form, you can manage to store the data the way you want.

PS back : Personnally, I wouldn't like this feature. The less I click, the more I'm happy ;)
 
Thank you, kinkaz

I know, but sometime those clicks are very useful :)

I can use multiple dropdown elements or a dbjoin element with a cdd element, but i'd love to see this kind of flexibility in Fabrik, together with some other features that i requested here over time ;)
 
There are so many useful features it would be nice to have, but only 24 hours in the day. :(

Most new Fabrik features get added either a) by popular demand, when enough people are wanting a feature, or b) when someone pays us to implement a specific feature for them.

Hint hint. ;)

-- hugh
 
hints received :) I am willing to pay for this, can you send me a PM with a quote price? If anyone else need this feature, we can split the price, i don't need exclusivity
 
Do you see the sub-categories as actually have a selectable 'value' in any sense, or simply formatting /indentation for grouping of the actual selectable options?

-- hugh
 
a formatting/indentation of subcategories so user should be able to understand that this category is child of a main category.
 
It is unclear whether sales2010 wants this in the dropdown element, the databasejoin / cascading dropdown element.

If this is a static list (like a menu) i.e. the dropdown element, I would imagine that the change might be relatively easy to implement - you would just need to have a checkbox for each row which says whether it is a group heading, and then when generating the HTML change the select row generated if this is checked.

If it is databasejoin / CDD then we would need to decide how a user would want to distinguish between options and groups, handle sorting issues, handle where clauses etc. etc. etc.

Perhaps sales2010 could indicate which type(s) of elements he is wanting this on?
 
Sorry for this late response. What i'm looking for is to display the options into the element as a tree menu. See attached image for what i would like to see. Each category might have link to content or it will be a separator in order to display the subcategories (similar with fabrik groups in version 3.1).

dropdown.png
 
The obvious way to do this is for you to create the entries (directly in dropdown element or in the database table for databasejoin / CDD elements) with spaces at the beginning of the entry.

(You might need to use   instead of spaces so it renders correctly. If this in a fabrik list, you might want to have a column for level (0-n) and a column for the text, and use a calculated field to create the indented text.)

S
 
Thank you Sophist,

I was thinking to have the data from a dbjoin and a cdd join in the same element if is possible.

But i like your idea :) Please tell me how can i set the main category to appear as a divider (without any link), the way that fabrik groups are displayed now in element settings?
 
Sales2010 - the dbjoin as it stands just doesn't have this functionality. However, it should not be that difficult to add an option so that if the value field is empty then an option group line is created using the label instead of an option line.

The great thing about Fabrik is that it is open source, so if you really want this functionality then you can certainly create an enhancement that provides it.

S
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top