I'd like to change the entry type that's pre-selected when creating a new entry depending on the site that's being edited (doing that with JS).
In control panel, does anyone know how I can trigger the Craft.EntryTypeSwitcher
change
event? I can detect which site is currently being edited and I can change the value of the Entry Type dropdown, but I don't know how to trigger the event that then reloads the page to get the fields for that entry type. I'm assuming I need something similar to this: https://craftcms.stackexchange.com/a/25828/6516 (it's just that I need to trigger an event and not hook up to it)? Does anyone know how to do this?
Add a comment
|