Page 1 of 1

TinyMCE breaks hidden form fields?

Posted: Tue Feb 05, 2008 10:48 am
by meraj
Hello all,

I tried searching for this specific issue but couldnt turn up anything. Apologies in advance if I've overlooked a previous answer.

I'm using TinyMCE which im fine with for the most part. The problem I'm having is that whenever I try to create a form which contains hidden fields while in HTML mode in TinyMCE, and then I switch back to WYSIWYG mode, it breaks all the hidden fields  :'( They all show up as actual text boxes, and their hidden "values" get stripped from the code.

Is this normal behavior, and if so, is there a way to change it? I didn't see any options, either in the TinyMCE options or in its configuration file. If theres no official way to do it, could anyone suggest a hack or workaround? I'm ok with tinkering with some source code if I have to. Worst case scenario I'd have to disable TinyMCE, but I'd really like to keep TinyMCE's functionality and not have it break my forms.

Thanks much in advance!  :)

-m

Re: TinyMCE breaks hidden form fields?

Posted: Tue Feb 05, 2008 11:49 am
by Vin
What about making a global content block with the form and then including it in the page?

Other way would be using the FormBuilder module and including it in the page...

Re: TinyMCE breaks hidden form fields?

Posted: Tue Feb 05, 2008 11:56 am
by meraj
Vin wrote: What about making a global content block with the form and then including it in the page?
It's funny you should suggest that approach, because thats exactly what I had decided to resort to for now.  :P

I could use formbuilder, but my prefered method is to just put the code directly into the page.. the less calls and includes needed the better. The form isn't terribly complex either, so inline code would make the most sense. And its easier to edit it if its part of the page rather than having to go to a different part of the admin panel to access the form's code.

Anyhow, thanks for the recommendations. Any other ideas, anyone?

-m