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!
| Comment | File | Size | Author |
|---|---|---|---|
| example.txt | 351 bytes | Jim@apathycore.com |
Comments
Comment #1
boris mann commentedYou 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?
Comment #2
moshe weitzman commentedThe 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.
Comment #3
gordon commentedcan 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.
Comment #4
Jim@apathycore.com commentedI 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!
Comment #5
Jim@apathycore.com commentedSorry, I noticed that the code tag was rendered in my previous post.
Also, to be clear I am using "Full HTML" not "Filtered HTML".
Comment #6
gordon commentedI 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.
Comment #7
gordon commentedI do 99% of my testing in firefox and it works fine.
Comment #8
Jhef.Vicedo commentedI encountered the same problem and I had read that this is indeed an IE bug. I just forgot where I read this though.
Comment #9
Jim@apathycore.com commentedIt 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!
Comment #10
gordon commentedI 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.
Comment #11
gordon commentedThis is a Xinha Issue