simple HTML bug fix in FreeForm
Posted: 07 February 2008 01:47 PM
[ Ignore ]
Newbie
Total Posts: 19
Joined 2008-01-24
I was validating the code for a site I made using FreeForm, and come to find out that it doesn’t put quotes around two simple parameters in the form. Below is what I have it outputting on my site:
< form id = contact method = "post" action = "http://paradigmmusicgroup.com/contact/" > < div class= hiddenFields >
All it needs to be doing is:
< form id = "contact" method = "post" action = "http://paradigmmusicgroup.com/contact/" > < div class= "hiddenFields" >
Very simple fix, but its causing me some major problems. it’s actually crashing the browser for IE6 users! I’ve tried locating where this occurs in the module PHP files, but I can’t seem to find it.
Posted: 08 February 2008 06:46 AM
[ Ignore ]
[ # 1 ]
Administrator
Total Posts: 693
Joined 2004-03-30
C.Barr,
We’re using behavior that’s native to EE for this. In Freeform, we pass an array to an EE class/method. That class/method generates the form code for you. It’s odd, but it’s not something directly in the Freeform code. If you want to fix it for your site open core.functions.php and edit the form_declaration method. You’re looking for this:
"id='" . $data[ 'id' ] . "' "
mk
Signature
Mitchell Kimbrough
Posted: 16 February 2008 01:54 PM
[ Ignore ]
[ # 2 ]
Jr. Member
Total Posts: 32
Joined 2007-03-17
Strange that this should pop up now but I am having the same issue.
Some of my other single quotes are being stripped away as well.
....
While writing this I just did some more testing and I too believe this is an issue with FreeForm specifically FF 2.6.2 and EE 1.6.2
If you add
return $str ;
to the op of the _chars_decode method (basically disabling the method) then the single quotes are not stripped.
Maybe EE and FF are fighting each other somewhere in the code.
Hopefully a fix will come soon.
Signature
View all my EE addons!
LG .htaccess generator
LG Twitter
LG Polls
LG Better Meta
LG Twitter
LG Addon Updater
LG TinyMCE
Posted: 16 February 2008 03:32 PM
[ Ignore ]
[ # 4 ]
Newbie
Total Posts: 19
Joined 2008-01-24
Great! I just updated and it fixed my problems on one site!
Posted: 25 February 2008 09:19 AM
[ Ignore ]
[ # 5 ]
Newbie
Total Posts: 1
Joined 2006-02-17
I just re-downloaded and this did not fix the same problem. What could I be doing wrong?
I’m using EE 1.6.2, the January 24 build and I downloaded FreeForm this morning and re-installed it. I don’t see a build number.
Thanks,
dhl
Posted: 25 February 2008 12:59 PM
[ Ignore ]
[ # 6 ]
Newbie
Total Posts: 19
Joined 2008-01-24
Go here and download freeform: http://www.solspace.com/software/detail/freeform/
Posted: 25 February 2008 01:30 PM
[ Ignore ]
[ # 7 ]
Administrator
Total Posts: 2732
Joined 2006-10-18
C.Barr & Dan Lovejoy,
Did you make the modification to the core.functions.php as well?
It’s a two part issue.... at the time, there was a Freeform bug that was stripping the quotation marks from a couple other ID’s… but the
< div class= hiddenFields >
is an EE issue, which can be corrected with Mitchell’s suggested modification
Signature
Posted: 25 February 2008 01:57 PM
[ Ignore ]
[ # 8 ]
Newbie
Total Posts: 19
Joined 2008-01-24
I made no modification to any EE file, the new version of EE and the new version of Freeform together has fixed the issue for me.
Posted: 27 February 2008 08:18 AM
[ Ignore ]
[ # 9 ]
Newbie
Total Posts: 13
Joined 2008-02-27
C.Barr - 25 February 2008 01:57 PM
I made no modification to any EE file, the new version of EE and the new version of Freeform together has fixed the issue for me.
That’s odd because I have the latest build of both FF2.6.3 and EE 1.6.2 and I’m still getting the error!
Signature
Some people see things that are and ask, Why? Some people dream of things that never were and ask, Why not? Some people have to go to work and don’t have time for all that ...
Posted: 27 February 2008 08:37 AM
[ Ignore ]
[ # 10 ]
Administrator
Total Posts: 2732
Joined 2006-10-18
Comment out these lines in core.functions.php : (Lines 514, 521 in EE 1.6.2)
$form .= "<div class='hiddenFields'>\n" ;
$form .= "</div>\n\n" ;
Signature
Posted: 27 February 2008 08:44 AM
[ Ignore ]
[ # 11 ]
Newbie
Total Posts: 13
Joined 2008-02-27
Unfortunately, it’s just not working. I’ve commented out as suggested, but I’m still getting:
< form id = freeform method = "post" action = "http://www.clt-conference.co.uk/registration/" > < input type = "hidden" name = "ACT" value = "28" /> < input type = "hidden" name = "URI" value = "/registration/" /> < input type = "hidden" name = "XID" value = "ea8ec5e97c40acee221099b2ac91d82a1833194e" /> < input type = "hidden" name = "status" value = "open" /> < input type = "hidden" name = "return" value = "registration/thankyou" /> < input type = "hidden" name = "redirect_on_duplicate" value = "" /> < input type = "hidden" name = "RET" value = "http://www.clt-conference.co.uk/registration/" /> < input type = "hidden" name = "form_name" value = "cltbooking" /> < input type = "hidden" name = "id" value = "freeform" /> < input type = "hidden" name = "params_id" value = "2278" /> < input type = "hidden" name = "site_id" value = "6" />
It gets rid of the div error, but I’m still not getting quotes round the form ID. :o(
Signature
Some people see things that are and ask, Why? Some people dream of things that never were and ask, Why not? Some people have to go to work and don’t have time for all that ...
Posted: 27 February 2008 12:03 PM
[ Ignore ]
[ # 12 ]
Newbie
Total Posts: 19
Joined 2008-01-24
Well, it’s working for me on this site, check the code: http://paradigmmusicgroup.com/contact/
This site is using the EE Personal license though, maybe it’s fixed here and not in other version of EE, like the Core?
Posted: 27 February 2008 12:16 PM
[ Ignore ]
[ # 13 ]
Administrator
Total Posts: 2732
Joined 2006-10-18
Interesting,
It would be interesting if there’s a difference between the two. All my testing has been done on EE Commercial.
My suspicians have been that Freeform is maybe responsible....
I will have a look into this though
Signature
Posted: 27 February 2008 02:20 PM
[ Ignore ]
[ # 14 ]
Newbie
Total Posts: 13
Joined 2008-02-27
Indeed. This is on a Commercial install (with MSM), although I have a personal one and a few core ones I could compare it with.
I’ll patch them all up to current specs and see what happens!
Signature
Some people see things that are and ask, Why? Some people dream of things that never were and ask, Why not? Some people have to go to work and don’t have time for all that ...
Posted: 27 February 2008 02:22 PM
[ Ignore ]
[ # 15 ]
Administrator
Total Posts: 2732
Joined 2006-10-18
dasgrafik - 27 February 2008 02:20 PM
Indeed. This is on a Commercial install (with MSM), although I have a personal one and a few core ones I could compare it with.
I’ll patch them all up to current specs and see what happens!
That’d be great… and don’t modify the core.functions.php file.
Thanks!
Signature