I have created forms in the Htmlarea using various input elements such as checkbox, hidden, submit, etc. This works fine initially when I input the code theough the text mode. However, if I switch back to wysiwyg any value attributes are completely stripped out of the code. I can submit a new page without going back to wysiwyg, and the page will display correctly. If I then go back to edit the page, all the values are gone again.

(I have included a text file showing an example, as I could not post the code here.)

So, submit buttons always say "Submit Query" and no values from other inputs are passed. I hope this is not intentional, as it's important for me to be able to code forms and I like using Htmlarea.

Thanks!

CommentFileSizeAuthor
example.txt351 bytesJim@apathycore.com

Comments

boris mann’s picture

You are likely using HTMLArea in conjunction with the "Filter HTML" filter. Either don't use that filter (use all HTML allowed) or add the required tags as well as don't strip attributes.

Q: Why are you using HTMLArea to create forms in HTML instead of using the forms.module or other built-in Drupal features?

moshe weitzman’s picture

The submitter is saying that attributes are stripped just when he switches from text => wysiwyg mmode within htmlarea. this has nothing to do with drupal. the page is not being submitted.

i suggest asking in the htmlarea support forum.

gordon’s picture

Assigned: Unassigned » gordon

can you please test this at my demo site, I have triied it and I cannot replicate this issue.

http://www.heydon.com.au/?q=htmlareademo

If this works, then upgrade to the latest version.

Jim@apathycore.com’s picture

I just tried the demo site and got the same "value stripping" results.

To recreate this, go to the demo site, switch to text mode (<>), paste in the top block of code from my example.txt file (don't include the tags). When you switch back to wysiwyg, the hidden attribute is shown with a value of "XYZ" and the button has the "Get Results!" label. If you then go back to text mode, all the "value" tags and their contents are gone. Submitting or returning to wysiwyg yields a blank hidden attribute and "Submit Form" on the button.

For the record, I'm using the 4.5.0 "1.56 2004/09/21 12:49:21" version of Htmlarea.

Thanks again!

Jim@apathycore.com’s picture

Sorry, I noticed that the code tag was rendered in my previous post.

Also, to be clear I am using "Full HTML" not "Filtered HTML".

gordon’s picture

I have tested it, and I found that you are running this in IE. IE has yet another bug and is stripping the value attributes.

I will have a quick look when I get a chance and see what I can do, but this is really an upstream problem and not a drupal problem.

gordon’s picture

I do 99% of my testing in firefox and it works fine.

Jhef.Vicedo’s picture

I encountered the same problem and I had read that this is indeed an IE bug. I just forgot where I read this though.

Jim@apathycore.com’s picture

Title: All VALUE attributes erased when editing in Htmlarea » Absolutely IE

It absolutely seems to be an IE bug. This behavior does not exist in Firefox. I have also noticed that Firefox maintains linefeeds and formatting, whereas IE runs all the raw HTML together. Thanks for looking into this for me. I wish I'd thought to eliminate the browser -- I would have saved your time. Thanks again!

gordon’s picture

Category: bug » task

I know that when going between the source view and html view, the getHTML() walks the xml and creates the new html which is posted. What is most likely happening is that the function is not extracting the value attribute. I will look some time to see if I can see this attribute and make sure it get pasted back as well.

gordon’s picture

Title: Absolutely IE » All VALUE attributes erased when editing in Htmlarea
Version: 4.5.x-1.x-dev » 4.6.x-1.x-dev
Status: Active » Closed (fixed)

This is a Xinha Issue