views:

148

answers:

1

I am using a rich text editor and in HTML mode, I want to put a FORM tag within my code. However, when I save, the tag disappears. I guess you cant have a FORM in the code within the FORM.

So I think what's happening is this:

<form name="form">
<textarea><form><input type="text"></form></textarea>
<input type="submit" value="submit">
</form>

Is there anyway I can use javascript (I am using jQuery) to serialize it or other ways of getting it to save with FORM tag in my editor content?

Thanks!

+1  A: 

I think this is getting prevented by the browser's rendering engine (or the RTE's validation).

You could use a different tag for the inner form <farm> and to replace it on the fly on the save event of the editor.

But what do you need a nested form for in the first place?

Pekka
I am using rich text editor and wanted to just put some HTML code with a form in it. Hmmm.. so use javascript replace on the fly huh? I'll try that.thanks so much!
Scott
You're welcome, but are you sure you need *two* forms?
Pekka
I am using jQuery to serialize everything within the first FORM tag for a submit. And the TEXTAREA is part of the first FORM tag. That's the main reason.
Scott
Ah, I see! ----
Pekka