23490 Posts in 18996 Topics by 2878 members
|Go to End|
8 June 2013 at 3:27am Last edited: 8 June 2013 3:27am
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.
12 June 2013 at 3:10am
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?
12 June 2013 at 3:49am
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.
|Go to Top|