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.
I am attempting to insert a drop down selector on a page within the CMS.
I've tried using the HTML Source Editor on the page but with I click "Update" it strips out my code.
My plan was to use this as a way to navigate to anchor tags within an FAQ page without listing out all of the questions at the top of the page as links.
I was using code like this:
<option value="Question 1" ><a href="#quest1"Question One</a></option>
<option value="Question 2" ><a href="#quest2">Question Two</a></option>
<option value="Question 3" ><a href="#quest3">Question Three</a></option>
Any help will be greatly appreciated.
I'm still trying to figure out how to get this on a page without the system stripping out the code.
This code works in a stand-alone webpage:
<select name="faqForm" ONCHANGE="location = this.options[this.selectedIndex].value;">
<option value="#">Select Your Question</option>
<option value="#quest1">Question One</option>
<option value="#quest2">Question Two</option>
<option value="#quest3">Question Three</option>
<option value="#quest4">Question Four</option>
<option value="#quest5">Question Five</option>
However, when I go into the HTML Source Editor (within the content area for the page) and type the above code in - the system strips it out as soon as I click Update. It converts it to this:
<p>Select Your QuestionQuestion OneQuestion TwoQuestion ThreeQuestion FourQuestion Five</p>
Is there a trick to getting the system to leave my code as is?
What you're looking for is "valid_elements" and "extended_valid_elements", options of tinyMCE.
You can set this options with:
But I have to tell you: what you want to do is actually a bad idea. Especially the additional "form" tags in your code.
You could simply write a method in your page class, which seeks your anchor tags in $this->Content() and return them as a DropdownField for the template.