[solved] Form code changed after submit via TinyMCE

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
twen88
Forum Members
Forum Members
Posts: 118
Joined: Thu Aug 16, 2007 8:07 pm

[solved] Form code changed after submit via TinyMCE

Post by twen88 »

???This is very strange, below is my initial html code in the content:



Once I submit this content via Tinymce, the code has become like this, and the Javascript onSubmit is gone.



Any idea about this please? Thank you!

I am using CMSMS 1.41, and TinyMCE 2.4.2.
Last edited by twen88 on Thu Sep 25, 2008 4:03 pm, edited 1 time in total.
nhaack

Re: Form code changed after submit via TinyMCE

Post by nhaack »

Could this be a solution for your problem?

http://forum.cmsmadesimple.org/index.php/topic,24981.0.html

Best
Nils
Last edited by nhaack on Fri Sep 19, 2008 12:22 am, edited 1 time in total.
twen88
Forum Members
Forum Members
Posts: 118
Joined: Thu Aug 16, 2007 8:07 pm

Re: Form code changed after submit via TinyMCE

Post by twen88 »

Hi Nils, Thank you for the response. I made change on the tinyconfig_gz.php page as following:

tinyMCE_GZ.init({
  disk_cache : "false",
  plugins : "GetPreference('plugins') ?>",
  language: "GetPreference("live_language","en"); ?>",
  themes : "advanced",
  debug : true,
  cleanup_on_startup : false,
  cleanup : false
});


It still doesn't seem to work for me. I did, however, turned off wysiwyg and forced the code to submit. It is very annoying. I am still hoping someone have a solution with this? 
nhaack

Re: Form code changed after submit via TinyMCE

Post by nhaack »

mhh... the only thing I can think of at the moment would be to create a new template for the specific page (based on the normal template) and add a content block like the following to it right where you want to have your form code.

Code: Select all

{content block="form data" wysiwyg="false"}
This would get you a WYSIWYG Editor free content field while you can use the editor everywhere else, so you do not need to switch between the two user-preferences.

However, you can not put this right in between an existing content block (e.g. CONTENT-FORM-CONTENT. In that case your would need another content block for what is coming afterwards (if it is editorial content). Things like CONTENT-FORM or FORM-CONTENT should be fine.

Best
Nils
Last edited by nhaack on Fri Sep 19, 2008 12:34 am, edited 1 time in total.
twen88
Forum Members
Forum Members
Posts: 118
Joined: Thu Aug 16, 2007 8:07 pm

Re: Form code changed after submit via TinyMCE

Post by twen88 »

Sounds like a plan, i will do just that!! Thank you so much for helping out, Nils.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Form code changed after submit via TinyMCE

Post by Dr.CSS »

Have you tried using form builder?...
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Form code changed after submit via TinyMCE

Post by calguy1000 »

come on, this is stupid.

TinyMCE is a WYSIWYG editor.... WYSIWYG is an acronym for  'WHAT YOU SEE IS WHAT YOU GET'.

Therefore, if you type a into a WYSIWYG editor content area, that is exactly what should appear in the output.

if you are trying to put logic and/or code into a wysiwyg editor, and it's not working for you, then you need to go back to school, or find a freaking better instructor.

if I type into the tinyMCE content area for a page then I expect the exact same stuff to appear when I view the content area.

Go back to school.... or find a package that can actually read your mind.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
twen88
Forum Members
Forum Members
Posts: 118
Joined: Thu Aug 16, 2007 8:07 pm

Re: Form code changed after submit via TinyMCE

Post by twen88 »

So is it an error on TinyMce side or I can do something to make it work rather than creating a content block as nails suggested?
rvdv
Forum Members
Forum Members
Posts: 62
Joined: Wed Oct 31, 2007 2:16 pm

Re: Form code changed after submit via TinyMCE

Post by rvdv »

Go to your TinyMCE options and go to the advanced tab. There you have a text field named 'Extra configuration'. You have to add the following line in there:

Code: Select all

extended_valid_elements : "form[method|action|name|onsubmit]"
If you want extra actions in there just place them after onsubmit separated with an |


@calguy1000
If you read the topic you can see he added that using the HTML editor in TinyMCE so just chill and try to act like you're really someone from the CMSMS team here...
Last edited by rvdv on Thu Sep 25, 2008 12:18 pm, edited 1 time in total.
twen88
Forum Members
Forum Members
Posts: 118
Joined: Thu Aug 16, 2007 8:07 pm

Re: Form code changed after submit via TinyMCE

Post by twen88 »

It workes beautifully!!!!!!!!!!

Thank you all so much for helping out here.

Mark, since I am migrating an existing site into CMSMS. The contact form PHP has quite complex programming to it. Thus I'd rather keep the old PHP logic than creating a new form using the form builder.

Thanks again.
Last edited by twen88 on Thu Sep 25, 2008 4:07 pm, edited 1 time in total.
Post Reply

Return to “CMSMS Core”