Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Inserting a <form> </form>

 

 


dan_999
User

Apr 14, 2008, 6:18 AM

Post #1 of 6 (390 views)
Shortcut
Inserting a <form> </form> Can't Post

Hi,
I've just started using CMS Builder today and so far so good! Looks like this is going to be a really easy way of giving clients access to update their pages.

A quick question though.

I've set a content section up as WYSIWYG but when I go to the HTML view and type in my <form> code, as soon as I switch to normal view it seems to strip it all out.

Have I missed an option somewhere?

thanks
Hartlepool


Dave
Staff / Moderator


Apr 14, 2008, 9:31 AM

Post #2 of 6 (385 views)
Shortcut
Re: [dan_999] Inserting a <form> </form> [In reply to] Can't Post

It looks like the wysiwyg editor (tinyMCE) strips those out by default. If you're comfortable editing the PHP you can turn that feature off. Here's how:

- Open /lib/menus/default/edit_functions.php
- Make a backup copy of that file
- Search for 'entity_encoding'
- After that line, add this line (in red):


Code
entity_encoding : "raw", // ... 
extended_valid_elements : "form[action|accept|accept-charset|enctype|method]",


Then save that file and reload your editor and you should be able to enter form tags in the HTML.

Hope that helps, let me know if you have any further problems with that or need more assistance.

Dave Edis - Senior Developer
interactivetools.com


dan_999
User

Apr 14, 2008, 10:32 AM

Post #3 of 6 (382 views)
Shortcut
Re: [Dave] Inserting a <form> </form> [In reply to] Can't Post

Hi Dave,
Thanks - getting there I think.

That seems to keep my form opening and closing tags but now my <input> <textarea> and <select> bits of the form are being stripped out.
Hartlepool


InHouse
User

Apr 14, 2008, 11:38 AM

Post #4 of 6 (380 views)
Shortcut
Re: [dan_999] Inserting a <form> </form> [In reply to] Can't Post

Sounds like you'll have to repeat the above process for each of the form entities you don't want the editor to strip out. On the plus side, you only have to do this once... until the next update. Wink

J.


Dave
Staff / Moderator


Apr 14, 2008, 12:31 PM

Post #5 of 6 (377 views)
Shortcut
Re: [dan_999] Inserting a <form> </form> [In reply to] Can't Post

There's some more docs on these configuration options here:
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/valid_elements
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/extended_valid_elements

But for a quick fix, this should allow all tags:


Code
entity_encoding : "raw", // ...  
extended_valid_elements : "*[*]",


I tested it locally and that worked with the input, textarea and other tags. Let me know if it does the trick.

Dave Edis - Senior Developer
interactivetools.com


dan_999
User

Apr 14, 2008, 12:56 PM

Post #6 of 6 (374 views)
Shortcut
Re: [Dave] Inserting a <form> </form> [In reply to] Can't Post

Spot on thanks - the * thing will certainly help me out for next time I try something else.

cheers
Hartlepool

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4