Entry-Filtered Select Box (suggestion)
This is an open discussion with 20 replies, filed under Extensions.
Search
You mean like the Publish Filter extension?
No, I think what FabioPittol is after is a way to filter select boxes based on previous selections when creating an entry.
Another analogy for it could be the old. Country -> State -> City.
When choosing your the Country, the States are filtered, when choosing the State, the cities are filtered.
As fair as I know, there isn’t a way to currently do this, but yes, I agree it would be a nice extension :)
This is precisely the sort of thing that will be made possible when the good old REST API is finished.
Oh, country/region/town sort of thing? I do that on a timeshare site I built.
Basically, I use the Categories extension to generate my list of countries, states and towns (they have to be entered one at a time but since I only enter ones I need it’s not that big a deal) and then you can pull that into a select box which will break it down to Country / Region / Town.
Is that more what you’re after?
Yeah, is really something like country/region/town (nice analogy brendo)
doug, what’s this Categories extension
you’re talking about? It’s a stand-alone extension? Or a built-in feature of the system?
Sorry, the extension is actually called Nested Cats and it is no longer on GitHub or the extensions section…
My guess it’s a dead extension. Well that’s a bit problematic as I’m using it on two different sites!
Well, that sucks. Right, so does anyone have another solution? The only thing I can think of is to use the Address Field to enter in all addresses and then build your site-side selectbox with some XSLT templates. Wow, that’s not going to be fun.
Sorry if addresses aren’t really what you’re trying to do here. Nested Cats was my go-to solution otherwise.
Maybe you could create a section called categories that would allow you to choose another category as your parent? I’m not sure how that would work in Symphony but you could build out the whole thing easily on the front-end.
Symphonians don’t like to be beaten. There must be a way of incorporating this into a custom field type somehow.
lol
On the showcase of the sites using Symphony I found one which has this kind of country/city thing.
http://www.no-excess.nl/storelocator/
I don’t know if they used the extension Doug mentioned or created it’s own :/
You select the Country, it filters the Cities and also show you a list of Stores when you hit Enter
.
But that’s on the front end. Building this type of thing on the front end would be easy enough. It’s creating a Symphony field for the back end with this functionality that’s a bit more challenging.
Yeah, you’re right…I forgot ‘bout that!
Just found the Nested Cats
extension in a package on Github. But I’m getting a Fatal Error
trying to save a Section with this field. :/
Here’s the error:
Column 'parent_section_id' cannot be null An error occurred while attempting to execute the following query * INSERT INTO `sym_sections_association`(
parent_section_id
,parent_section_field_id
,child_section_id
,child_section_field_id
,cascading_deletion
) VALUES (NULL, ‘5’, ‘7’, ‘134’, ‘no’)Backtrace: * [C:wampwwwlbnsymphonylibtoolkitclass.mysql.php:275]MySQL->__error(); * [C:wampwwwlbnsymphonylibtoolkitclass.mysql.php:219] MySQL->query(); * [C:wampwwwlbnsymphonylibtoolkitclass.field.php:142] MySQL->insert(); * [C:wampwwwlbnextensionsnested_catsfieldsfield.nested_cats.php:170] Field->createSectionAssociation(); * [C:wampwwwlbnsymphonycontentcontent.blueprintssections.php:705] fieldNested_Cats->commit(); * [C:wampwwwlbnsymphonylibtoolkitclass.administrationpage.php:119] contentBlueprintsSections->__actionEdit(); * [C:wampwwwlbnsymphonylibtoolkitclass.administrationpage.php:100] AdministrationPage->__switchboard(); * [C:wampwwwlbnsymphonylibtoolkitclass.administrationpage.php:70] AdministrationPage->action(); * [C:wampwwwlbnsymphonylibcoreclass.administration.php:88] AdministrationPage->build(); * [C:wampwwwlbnsymphonylibcoreclass.administration.php:204] Administration->__buildPage(); * [C:wampwwwlbnindex.php:20] Administration->display();
This is quite an old thread, but Craig could you explain yer thoughts behind this please:
This is precisely the sort of thing that will be made possible when the good old REST API is finished
While the API will allow for easier data selection/filtering, there would still need to be a custom “container” field that stitches a Select Box Link together with RESTful API calls?
But that’s on the front end. Building this type of thing on the front end would be easy enough. It’s creating a Symphony field for the back end with this functionality that’s a bit more challenging.
With the HTML Panel field this now might be possible. But it would be nice to devise a generic way of achieving this.
Sure. The thought was that you could have a sort of Filtered Select Box Link field, that extends SBL and relies on the REST API. In the field settings, you point it to the section you want to link to, as normal, but then you get to define some filter options. You could set it to ‘watch’ a field, for example, and use that field’s value to filter its target entries (using the REST API). This quick mockup is a bit convoluted, but it could work something like this:
Tangential, but possibly related, is the sort of functionality where you can display different bits of a form depending on a select box value. What I have in mind here is: say you’ve got a section called Publications. There’s a ‘Type’ select box and depending on what type is selected, you display a different subset of fields, or different labels for fields, that sort of thing. But I guess that’s a different thing entirely.
Anyway, does that clarify? Or obfuscate?
Kind of clarifscates, cheers. Will ponder this.
This could be quite useful!
I need this too!
But that screenshot seems a bit complicated ..
What about
Could you explain a bit more about what the screenshot would achieve?
For example, I have multiple “topics” and 3 “subjects”. “subjects” contain “topics”. Each “topic” is exclusive to a “subject”. I want to create one “topic” section and several “subject” sections custom to the subject. The Select Box should only contain “topics” about the “subject” I am filtering for in the creation of the unique “subject” section.
I know this is an old thread now, but does anyone know if this extension has been made?
Create an account or sign in to comment.
Hello,
I was thinking about a
Select Box
that can filter it’s options by another field on the section (like Reflection Field’s {entry/})For example (a racing league emsemble):
You have a
Section
called Chassis with the following entries:You have a
Section
called Series with the following fields:Text Input
]Select Box
populated byChassis
section, multiple selections]In this Section you create a entry like this:
Now you have a
Section
called Driver with the following fields:Select Box
populated bySeries name
]Select Box
populated byChassis
filtered by the option selected on theCar : Series
field]So in this case when adding a new Driver, if you select
Sprint Cup
forCar : Series
theCar : Chassis
field will only displayChevy Impala
andDodge Charger
, not all the entries of theChassis
section.Am I clear? How hard is to explain it all with words! lol This is a “good ideia” or already has a easy way to do that?