Forums

Error saving Chronoform due to certain Hex codes

bizzynate 15 May, 2009
After upgrading to 3.1 RC5, forms with any greater than (>) or less than (<) characters that are displayed as hexadecimal equivalents (%3E and %3C respectively) will cause an unreported error that results in an unsuccessful save.

For example, attempting to publish the following code into the "html" field of the chronoform admin:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>

followed by clicking the "Apply" or "Save" buttons will redirect you to the admin panel without saving your changes.
Max_admin 18 May, 2009
Hi bizzynate,

I agree, but that's because there is a JS routine runs on the HTML code when the form is saved, it makes a problem with your JS code which actually shouldn't rest in the HTML box, JS code should go to the JS code box over the HTML one without tags!😉

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 18 May, 2009
Hi bizzynate,

This looks like 'ordinary' Google Analytics code and I'm not clear why you'd want to load it from a Form anyhow.

Bob

PS There's a configurable module to do this on my site here - the module will autodetect the url and load the analytics code at the end of the page.
This topic is locked and no more replies can be posted.