Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Where do I put javascript so it will affect SELECT control in CMS widget area?


Go to End


1160 Views

Avatar
ImacSS

Community Member, 35 Posts

12 August 2009 at 6:37am

Edited: 13/08/2009 2:03am


Not sure if this should go under Widgets, or Customizing the CMS - so I put it in both.

I've created a widget, where I have two dropdown (select) controls. When editing the Widget in the CMS - I would like the second dropdown control to only appear when the first dropdown control is set to a specific value. When it is not set to this value, the second dropdown control would not be visible.

My first thought would be to hang javascript off of the first dropdown, but the problem is I don't know where to put this javascript so it will effect the dropdown in the CMS.

Can anyone here point me in the right direction?

Appreciate your time - thanks!