5450 Posts in 1672 Topics by 1197 members
|Go to End|
17 December 2008 at 12:40am
Apart from other fields, I have two dropdownfields in my Popup. I managed to get them populated with data. However, as there is a one-to-many relationship between them, I would like the second combo to be dynamically populated with the data specific to the first one. At the moment I get all the values in a second combo regardless of combo1. Is there a way to do it? And how can I find out if the state of the dropdownfield has been changed and how can I get the value?
I spent days on silverstripe doc, trying to find the answer but no luck.
Thank you in advance.
19 December 2008 at 12:20am
Has anybody attempted to add conditional fields in Popup at all? I managed to update a textfield on the selection of dropdownfield, with the value from that dropdownfield in a tab of admin (used behaviour js file). But no luck with Popup.
Any thoughts guys?
Just let me know if it is possible. Otherwise I will let my boss know that it's not going to happen and we will look at alternatives.
Thanks so much.
19 December 2008 at 9:27am
At this stage I believe not.
This is a guess, but I think you can't load scripts from a popup, so you can't add the behaviour properly. You'd have to do something really hacky. My answer would be try it another way.
19 December 2008 at 9:29am
Which makes me think - do tree views work from popups? That would be a good way of handling it in a single field. Eg, say your two dropdowns where countries -> city, you could put them together in a single tree view:
+ New Zealand
19 December 2008 at 9:58am
This is a feature that I've tried to add as well, but with no success. This is definitely something I'd like to be able to do. Maybe someone has gotten a hack to work, or maybe it's something that can be added in a later release?
|Go to Top|