Page 1 of 1
[solved] Form code changed after submit via TinyMCE
Posted: Thu Sep 18, 2008 9:17 pm
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.
Re: Form code changed after submit via TinyMCE
Posted: Thu Sep 18, 2008 10:30 pm
by nhaack
Re: Form code changed after submit via TinyMCE
Posted: Fri Sep 19, 2008 12:19 am
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?
Re: Form code changed after submit via TinyMCE
Posted: Fri Sep 19, 2008 12:31 am
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
Re: Form code changed after submit via TinyMCE
Posted: Fri Sep 19, 2008 12:35 am
by twen88
Sounds like a plan, i will do just that!! Thank you so much for helping out, Nils.
Re: Form code changed after submit via TinyMCE
Posted: Sat Sep 20, 2008 11:03 pm
by Dr.CSS
Have you tried using form builder?...
Re: Form code changed after submit via TinyMCE
Posted: Sun Sep 21, 2008 12:13 am
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.
Re: Form code changed after submit via TinyMCE
Posted: Wed Sep 24, 2008 3:37 pm
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?
Re: Form code changed after submit via TinyMCE
Posted: Thu Sep 25, 2008 12:16 pm
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...
Re: Form code changed after submit via TinyMCE
Posted: Thu Sep 25, 2008 4:02 pm
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.