Forums

Javascript being displayed on form

Monkofdoom 17 Jun, 2009
I've got a new Joomla installation (version 1.5.10) with chrono forms version 1.2/ V3.1 RC4.11

The form is setup and seems to display ok but when I enabled "Load Chronoforms CSS/JS Files?" or "javascript validation" it puts the following javascript on the page after the form and the validation doesn't work.

.'; eval("if(field.getProperty('title')){fMessage_val_validate_email = field.getProperty('title');}"); eval("cfvalidate_"+field.getProperty('name')+".add( Validate.Email, { failureMessage: fMessage_val_validate_email } );"); } if(field.hasClass('validate-url')){ var fMessage_val_validate_validate_url = 'Please enter a valid URL.'; eval("if(field.getProperty('title')){fMessage_val_validate_validate_url = field.getProperty('title');}"); eval("cfvalidate_"+field.getProperty('name')+".add( Validate.Format, { pattern: /^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i, failureMessage: fMessage_val_validate_validate_url } );"); } if(field.hasClass('validate-date-au')){ var fMessage_val_validate_date_au = 'Please use this date format: dd/mm/yyyy. For example 17/03/2006 for the 17th of March, 2006.'; eval("if(field.getProperty('title')){fMessage_val_validate_date_au = field.getProperty('title');}"); eval("cfvalidate_"+field.getProperty('name')+".add( Validate.Format, { pattern: /(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d/, failureMessage: fMessage_val_validate_date_au } );"); } if(field.hasClass('validate-currency-dollar')){ var fMessage_val_validate_currency_dollar = 'Please enter a valid $ amount. For example $100.00 .'; eval("if(field.getProperty('title')){fMessage_val_validate_currency_dollar = field.getProperty('title');}"); eval("cfvalidate_"+field.getProperty('name')+".add( Validate.Format, { pattern: /^\$?\-?([1-9]{1}[0-9]{0,2}(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9]{1}\d*(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$/, failureMessage: fMessage_val_validate_currency_dollar } );"); } Validate.One_Required = function(elm, paramsObj){ var paramsObj = paramsObj || {}; var message = paramsObj.failureMessage || "Must Choose one"; var ready = false; var elm = paramsObj.elm; var p = elm.parentNode; var options = p.getElementsByTagName('INPUT'); for(i=0; i 1)field.options[0].selected = true; eval("if(field.getProperty('title')){fMessage_val_validate_one_required = field.getProperty('title');}") eval("var cfvalidate_"+field.getProperty('name').replace('[]', '')+" = new LiveValidation(field, { validMessage: ' ', insertAfterWhatNode : field.parentNode });"); eval("cfvalidate_"+field.getProperty('name').replace('[]', '')+".add( Validate.One_Required, { elm : field, failureMessage: fMessage_val_validate_one_required } );"); } } }); $ES('select', $('ChronoContact_Parents_Newsletter_Signup')).each(function(field){ eval("var cfvalidate_"+field.getProperty('name').replace('[]', '')+" = new LiveValidation(field, { validMessage: ' ' });"); if(field.hasClass('validate-selection')){ var fMessage_val_validate_selection = 'Please make a selection'; if(field.size > 1)field.options[0].selected = true; eval("if(field.getProperty('title')){fMessage_val_validate_selection = field.getProperty('title');}"); eval("cfvalidate_"+field.getProperty('name').replace('[]', '')+".add( Validate.Presence, { failureMessage: fMessage_val_validate_selection } );"); } }); $ES('textarea', $('ChronoContact_Parents_Newsletter_Signup')).each(function(field){ eval("var cfvalidate_"+field.getProperty('name').replace('[]', '')+" = new LiveValidation(field, { validMessage: ' ' });"); if(field.hasClass('required')){ var fMessage_val_required = 'This field is required'; eval("if(field.getProperty('title')){fMessage_val_required = field.getProperty('title');}") eval("cfvalidate_"+field.getProperty('name').replace('[]', '')+".add( Validate.Presence, { failureMessage: fMessage_val_required } );"); } }); }); 


Thank you.
GreyHead 17 Jun, 2009
Hi monkofdoom,

Can you post a link to the page please. That's part of the validation javascript and if it's showing that suggests some other broken code on the page.

Bob
Monkofdoom 17 Jun, 2009
It's on an internal server at the moment so I can't post a link I'm afraid.

I've copied the source here, sorry it's so long and obviously I'm not sure if it'll be of help!

[code]It's on an internal server at the moment so I can't post a link I'm afraid.

I've copied the source here, sorry it's so long and obviously I'm not sure if it'll be of help!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" >
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta name="robots" content="index, follow" />
  <meta name="keywords" content="joomla, Joomla" />
  <meta name="title" content="Parents' and Carers'  Newsletter" />
  <meta name="author" content="Administrator" />
  <meta name="description" content="Joomla! - the dynamic portal engine and content management system" />
  <meta name="generator" content="Joomla! 1.5 - Open Source Content Management" />

  <title>Parents' and Carers'  Newsletter</title>
  <script type="text/javascript" src="/dev/media/system/js/mootools.js"></script>
  <script type="text/javascript" src="/dev/media/system/js/caption.js"></script>
  <!--[if gte IE 6]><link href="/dev/components/com_chronocontact/themes/default/css/style1-ie6.css" rel="stylesheet" type="text/css" /><![endif]-->
                <!--[if gte IE 7]><link href="/dev/components/com_chronocontact/themes/default/css/style1-ie7.css" rel="stylesheet" type="text/css" /><![endif]-->
                <!--[if !IE]> <--><link href="/dev/components/com_chronocontact/themes/default/css/style1.css" rel="stylesheet" type="text/css" /><!--> <![endif]-->
                        <link rel="stylesheet" href="/dev/components/com_chronocontact/css/calendar2.css" type="text/css" />

            <link href="/dev/components/com_chronocontact/css/tooltip.css" rel="stylesheet" type="text/css" />
            <script type="text/javascript" src="/dev/components/com_chronocontact/js/calendar2.js"></script>
            <script src="/dev/components/com_chronocontact/js/livevalidation_standalone.js" type="text/javascript"></script>
            <link href="/dev/components/com_chronocontact/css/consolidated_common.css" rel="stylesheet" type="text/css" />
            <script type="text/javascript">
	Tips.implement({
	initialize: function(elements, lasthope,options){
			this.setOptions(options);
			this.lasthope = lasthope;
			this.toolTip = new Element('div', {
				'class': 'cf_'+this.options.className + '-tip',
				'id': this.options.className + '-tip-' + this.options.elementid,
				'styles': {
					'position': 'absolute',
					'top': '0',
					'left': '0',
					'visibility': 'hidden'
				}
			}).inject(document.body);
			this.wrapper = new Element('div').inject(this.toolTip);
			$$(elements).each(this.build, this);
			if (this.options.initialize) this.options.initialize.call(this);
		},
	
		build: function(el){
			el.$tmp.myTitle = (el.href && el.getTag() == 'a') ? el.href.replace('http://', '') : (el.rel || false);
			if (el.title){
				var dual = el.title.split('::');
				if (dual.length > 1){
					el.$tmp.myTitle = dual[0].trim();
					el.$tmp.myText = dual[1].trim();
				} else {
					el.$tmp.myText = el.title;
				}
				el.removeAttribute('title');
			} else {
				var dual = this.lasthope.split('::');
				if (dual.length > 1){
					el.$tmp.myTitle = dual[0].trim();
					el.$tmp.myText = dual[1].trim();
				} else {
					el.$tmp.myText = el.title;
				}
			}
			if (el.$tmp.myTitle && el.$tmp.myTitle.length > this.options.maxTitleChars) el.$tmp.myTitle = el.$tmp.myTitle.substr(0, this.options.maxTitleChars - 1) + "…";
			el.addEvent('mouseenter', function(event){
				this.start(el);
				if (!this.options.fixed) this.locate(event);
				else this.position(el);
			}.bind(this));
			if (!this.options.fixed) el.addEvent('mousemove', this.locate.bindWithEvent(this));
			var end = this.end.bind(this);
			el.addEvent('mouseleave', end);
			el.addEvent('trash', end);
		},
		start: function(el){
			this.wrapper.empty();
			if (el.$tmp.myTitle){
				this.title = new Element('span').inject(new Element('div', {'class': 'cf_'+this.options.className + '-title'}).inject(this.wrapper)).setHTML(el.$tmp.myTitle);
			}
			if (el.$tmp.myText){
				this.text = new Element('span').inject(new Element('div', {'class': 'cf_'+this.options.className + '-text'}).inject(this.wrapper)).setHTML(el.$tmp.myText);
			}
			$clear(this.timer);
			this.timer = this.show.delay(this.options.showDelay, this);
		}
	});
	window.addEvent('domready', function() {
		$ES('.tooltipimg').each(function(ed){
			var Tips2 = new Tips(ed, $E('div.tooltipdiv', ed.getParent().getParent()).getText(), {elementid:ed.getParent().getParent().getFirst().getNext().getProperty('id')+'_s'});
		});
	});
	window.addEvent('domready', function() { 
								});
</script>			
		<style type="text/css">
			span.cf_alert {
				background:#FFD5D5 url(/dev/components/com_chronocontact/css/images/alert.png) no-repeat scroll 10px 50%;
				border:1px solid #FFACAD;
				color:#CF3738;
				display:block;
				margin:15px 0pt;
				padding:8px 10px 8px 36px;
			}
		</style>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title></title>
<link href="/dev/templates/vbs1/css/template.css" rel="stylesheet" type="text/css" />


<link href='/dev/templates/vbs1/css/style_base_cols.css' rel='stylesheet' type='text/css' title='Default' />

<link href='/dev/templates/vbs1/css/style_bow.css' rel='alternate stylesheet' type='text/css' title='Black On White' />

<link href='/dev/templates/vbs1/css/style_wob.css' rel='alternate stylesheet' type='text/css' title='White on Black' />

<link href='/dev/templates/vbs1/css/style_yob.css' rel='alternate stylesheet' type='text/css' title='Yellow On Black' />

<link href='/dev/templates/vbs1/css/style_boy.css' rel='alternate stylesheet' type='text/css' title='Black on Yellow' />


<style type="text/css">
body{ font-size: 1em }

</style>

<script type="text/javascript">
// <![CDATA[

var currentText = 1;

function setTextSize(size){
	
	//Add/subtract text size from current
	if(size == 'default') size = 1;
	else size = currentText + size;
	
	//Reset current size, minimum of 0.5em
	if(size > 0.8){
		currentText = size;
	}else{
		currentText = 0.8;
	}
	
	//Apply to body element
	document.getElementById("page_bg").style.fontSize = currentText+"em";	

	//Save in cookie
	createCookie('textsize',currentText, 365);
	return false;
}

function setActiveStyleSheet(title) {
   var i, a, main;
   for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
     if(a.getAttribute("rel").indexOf("style") != -1
        && a.getAttribute("title")) {
       a.disabled = true;
       if(a.getAttribute("title") == title) a.disabled = false;
     }
   }
   createCookie('stylesheet',title, 365);
   return false;
}

function createCookie(name,value,days) {
  if (days) {

    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
}
// ]]>
</script>


</head>

<body>

<div id="main">
	<div id="container">
		<div id="top_navigation">
			<div id="top_navigation_left">

				<a class="skipNavigation" title="Click to Skip Main Navigation" href="#content">Skip Navigation</a>
			</div>
			<div id="top_navigation_right">
										<div class="moduletable">
					<ul class="menu"><li class="item37"><a href="/dev/index.php?option=com_content&view=article&id=20&Itemid=37"><span>Accessibility</span></a></li><li class="item34"><a href="/dev/index.php?option=com_joomap&Itemid=34"><span>Site Map</span></a></li></ul>		</div>
	
						</div>
<div style="height: 1px; clear: both;"></div>

		</div>
		
		
		<div id="access">
			<div id="access_left_logo">
				 
			</div>
			<div id="access_right">



<ul id="accessbar">
                        <li id="minus"><a href="/dev/dev/index.php?option=com_content&view=article&id=49&Itemid=100012&access_fn=textdown"  onclick="return setTextSize(-0.1)" title="Decrease the text size"></a></li>

						<li id="plus"><a href="/dev/dev/index.php?option=com_content&view=article&id=49&Itemid=100012&access_fn=textup"  onclick="return setTextSize(0.1)" title="Increase the text size"></a></li>
						<li id="reset"><a href="/dev/dev/index.php?option=com_content&view=article&id=49&Itemid=100012&access_fn=textdefault" onclick="return setTextSize('default')" title="Reset the text size to default"></a></li>
						<li id='style_base_cols'><a href='stylesheet=Default' onclick='return setActiveStyleSheet("Default")' title='Change to Default style'><span></span></a></li>
<li id='style_bow'><a href='stylesheet=Black On White' onclick='return setActiveStyleSheet("Black On White")' title='Change to Black On White style'><span></span></a></li>
<li id='style_wob'><a href='stylesheet=White on Black' onclick='return setActiveStyleSheet("White on Black")' title='Change to White on Black style'><span></span></a></li>
<li id='style_yob'><a href='stylesheet=Yellow On Black' onclick='return setActiveStyleSheet("Yellow On Black")' title='Change to Yellow On Black style'><span></span></a></li>
<li id='style_boy'><a href='stylesheet=Black on Yellow' onclick='return setActiveStyleSheet("Black on Yellow")' title='Change to Black on Yellow style'><span></span></a></li>
	
					</ul>	
<div style="clear: both";></div>

			</div>
		</div>

		
		
		
		<div id="navwidth">
										<div class="module">
			<div>
				<div>
					<div>
											<ul class="menu"><li class="item42"><a href="/dev/"><span>Home</span></a></li><li class="item19"><a href="/dev/index.php?option=com_content&view=article&id=1&Itemid=19"><span>What we do</span></a></li><li class="item56"><a href="/dev/index.php?option=com_content&view=article&id=42&Itemid=56"><span>Fundraising</span></a></li><li class="item27"><a href="/dev/index.php?option=com_content&view=category&layout=blog&id=36&Itemid=27"><span>News</span></a></li><li class="item22"><a href="/dev/index.php?option=com_jcalpro&view=calendar&Itemid=22"><span>Events</span></a></li><li class="item100041"><a href="/dev/index.php?option=com_content&view=article&id=91&Itemid=100041"><span>FAQ</span></a></li><li class="item76"><a href="/dev/index.php?option=com_content&view=article&id=59&Itemid=76"><span>Job Vacancies</span></a></li><li class="item69"><a href="/dev/index.php?option=com_contact&view=contact&id=4&Itemid=69"><span>Contact</span></a></li></ul>					</div>

				</div>
			</div>
		</div>
	
					</div>
		
		
		<div id="header_video">
										<div class="moduletable">
					
			<div id="player">You must have <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> installed in order to see this player.</div>

			<script type="text/javascript" src="/dev/modules/mod_jw_vwc/swfobject.js"></script>
			<script type="text/javascript">
				var s1 = new SWFObject("/dev/modules/mod_jw_vwc/player.swf","ply","482","240","9","#000000");
				s1.addParam("allowfullscreen","true");
				s1.addParam("allowscriptaccess","always");
				s1.addParam("seamlesstabbing","true");
				s1.addParam("flashvars","file=/dev/videos_and_captions/what-we-do-video.flv&audiodescription.state=true&stretching=fill&autostart=false&screencolor=000000&backcolor=000000&frontcolor=ffffff&shortcuts.slowmotion=true&shortcuts.slowmotionvolume=100&image=/dev/videos_and_captions/what-we-do-splash.jpg&captions.file=/dev/videos_and_captions/what-we-do-captions.xml&captions.state=true&plugins=shortcuts-1,captions-1");
				s1.write("player");
			</script>
					</div>
	
					</div>
		
		
		<div id="content">
			
			
			

            			<div id="left_content">
            				<div class="panel">
					<div class="panelContents">

															<div class="moduletable_submenu">
					<ul class="menu_submenu"><li class="item100003"><a href="/dev/index.php?option=com_content&view=article&id=1&Itemid=100003"><span>About Us</span></a></li><li class="parent item100011"><a href="/dev/index.php?option=com_content&view=article&id=3&Itemid=100011"><span>The School</span></a></li><li class="parent item100005"><a href="/dev/index.php?option=com_content&view=article&id=4&Itemid=100005"><span>The College</span></a></li><li class="parent item100016"><a href="/dev/index.php?option=com_content&view=article&id=54&Itemid=100016"><span>VI Radio</span></a></li><li class="item100009"><a href="/dev/index.php?option=com_content&view=article&id=8&Itemid=100009"><span>Assessment</span></a></li><li class="parent active item100013"><a href="/dev/index.php?option=com_content&view=article&id=50&Itemid=100013"><span>Parents and Partners</span></a><ul><li class="item100002"><a href="/dev/index.php?option=com_jcalpro&view=calendar&Itemid=100002"><span>Parents' and Carers' Event Dates</span></a></li><li id="current" class="active item100012"><a href="/dev/index.php?option=com_content&view=article&id=49&Itemid=100012"><span>Parents' and Carers' Newsletter</span></a></li><li class="item100015"><a href="/dev/index.php?option=com_content&view=article&id=53&Itemid=100015"><span>Parents' as Partners' Meeting Minutes</span></a></li></ul></li><li class="item100010"><a href="/dev/index.php?option=com_content&view=article&id=14&Itemid=100010"><span>Documents</span></a></li><li class="item100014"><a href="/dev/index.php?option=com_content&view=article&id=52&Itemid=100014"><span>Inspection and Audit Reports</span></a></li><li class="item100017"><a href="/dev/index.php?option=com_weblinks&view=category&id=37&Itemid=100017"><span>External Links</span></a></li></ul>		</div>

	
											 </div>
					 <div class="panelBot"></div>
				 </div>
			            			                        
			</div>
            			
			<div id="body_content">
				
<div id="page">


<h1 class="componentheading">
        Parents' and Carers'  Newsletter</h1>




<p class="buttonheading">
	</p>





<p>
If you are a parent of a student attending the school and you would like to receive the Parents newsletter, please complete the form below. 
</p>
<div>
			
			                        						<form name="ChronoContact_Parents_Newsletter_Signup" id="ChronoContact_Parents_Newsletter_Signup" method="post" action="/dev/index.php?option=com_chronocontact&task=send&chronoformname=Parents_Newsletter_Signup&Itemid=100012" >

		
				<em>Required fields are indicated by an *</em>
<div class='row'>
<label for="contact_name"><strong>Enter your name:*</strong></label>
<input name="name" id="contact_name" size="30" value="" type="text" />
</div>

<div class='row'>
<label for="contact_email"><strong>E-mail address:*</strong></label>
<input name="email" id="contact_email" size="30" value="" type="text" />
</div>

<div class='row'>
<label for="contact_address">Address:</label>

<textarea cols="50" rows="10" name="address" id="contact_address"></textarea>
</div>

<div class='row'>
<label for="contact_tel">Telephone:</label>
<input name="tel" id="contact_tel" size="12"  value="" type="text" />
</div>

<div class='row'>
<strong>Preferred method of communication:*</strong>
</div>

<div class='row'>
<label for="contact_communication_email">Email:</label>

<input type="radio" name="communication_method" id="contact_communication_email"  value="Email" checked='checked'/>
</div>

<div class='row'>
<label for="contact_communication_mail">Royal Mail:</label>
<input type="radio" name="communication_method" id="contact_communication_mail" value="Royal Mail"/>
</div>

<div class='row'>
<strong>Sign me up for the:</strong>
</div>

<div class='row'>
<label for="contact_fundrasing">Fundraising newsletter:</label>

<input type="checkbox" name="fundrasing" id="contact_fundrasing"  value="Yes" checked="checked" />
</div>

<div class='row'>
<label for="contact_corporate">Corporate newsletter:</label>
<input type="checkbox" name="corporate" id="contact_corporate" value="Yes" />
</div>

<div class='row'>
<label for="contact_future">Tell me about future events:</label>
<input type="checkbox" name="future" id="contact_future" value="Yes" />
</div>

<div class="row">
</div>

<div class="row">
            <p><label for="securitycode">Please enter the first three letters of the following:<br />
            <strong>G B L U R Y </strong><span class="valRed">(required)</span></label><input id="securitycode" 

name="securitycode" type="text" onfocus="styleThis(this.name);" onblur="unStyleThis(this.name);" 

class="required" value="" /></p>
            <input name="checkran" type="hidden" id="checkran" value="3bbdcf582a889ec2858e7210022b66b15ed19a9e" />

</div>


<input value="Signup" class="button" type="submit" />		<input type="hidden" name="07233ae6cf292581feb02160fffb8457" value="1" />		

</form>

					
        <script type="text/javascript">
	Element.extend({
		getInputByName1 : function(nome) {
			el = this.getFormElements().filterByAttribute('name','=',nome)
			return (el)?(el.length)?el[0]:el:false;
		}
	});
	window.addEvent('domready', function() {
	$ES('input', $('ChronoContact_Parents_Newsletter_Signup')).each(function(field){
		if((field.getProperty('type') != 'submit')&&(field.getProperty('type') != 'reset')&&(field.getProperty('type') != 'button')&&(field.getProperty('type') != 'hidden')){
			if((field.getProperty('type') != 'radio')&&(field.getProperty('type') != 'checkbox')){
				eval("var cfvalidate_"+field.getProperty('name').replace('[]', '')+" = new LiveValidation(field, { validMessage: ' ' });");
			}
			//checkValidations(field, "cfvalidate_"+field.getProperty('name').replace('[]', ''));
			if(field.hasClass('required')){
				var fMessage_val_required = 'This field is required';
				eval("if(field.getProperty('title')){fMessage_val_required = field.getProperty('title');}")
				eval("cfvalidate_"+field.getProperty('name').replace('[]', '')+".add( Validate.Presence, { failureMessage: fMessage_val_required } );");
			}
			if(field.hasClass('validate-number')){
				var fMessage_val_validate_number = 'Please enter a valid number in this field.';
				eval("if(field.getProperty('title')){fMessage_val_validate_number = field.getProperty('title');}");
				eval("cfvalidate_"+field.getProperty('name')+".add( Validate.Numericality, { notANumberMessage: fMessage_val_validate_number } );");
			}
			if(field.hasClass('validate-digits')){
				var fMessage_val_validate_digits = 'Please use numbers only in this field. please avoid spaces or other characters such as dots or commas.';
				eval("if(field.getProperty('title')){fMessage_val_validate_digits = field.getProperty('title');}");
				eval("cfvalidate_"+field.getProperty('name')+".add( Validate.Numericality, { notAnIntegerMessage: fMessage_val_validate_digits } );");
			}
			if(field.hasClass('validate-alpha')){
				var fMessage_val_validate_alpha = 'Please use letters only (a-z) in this field.';
				eval("if(field.getProperty('title')){fMessage_val_validate_alpha = field.getProperty('title');}");
				eval("cfvalidate_"+field.getProperty('name')+".add( Validate.Format, { pattern: /^[a-zA-Z ]+$/, failureMessage: fMessage_val_validate_alpha } );");
			}
			if(field.hasClass('validate-alphanum')){
				var fMessage_val_validate_alphanum = 'Please use only letters (a-z) or numbers (0-9) only in this field. No spaces or other characters are allowed.';
				eval("if(field.getProperty('title')){fMessage_val_validate_alphanum = field.getProperty('title');}");
				eval("cfvalidate_"+field.getProperty('name')+".add( Validate.Format, { pattern: !/\W/, failureMessage: fMessage_val_validate_alphanum } );");
			}
			if(field.hasClass('validate-date')){
				var fMessage_val_validate_date = 'Please enter a valid date in this format yyyy/mm/dd';
				eval("if(field.getProperty('title')){fMessage_val_validate_date = field.getProperty('title');}");
				eval("cfvalidate_"+field.getProperty('name')+".add( Validate.Format, { pattern: /(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])/, failureMessage: fMessage_val_validate_date } );");
			}
			if(field.hasClass('validate-email')){
				var fMessage_val_validate_email = 'Please enter a valid email address. For example 
 <script language='JavaScript' type='text/javascript'>
 <!--
 var prefix = 'ma' + 'il' + 'to';
 var path = 'hr' + 'ef' + '=';
 var addy58403 = 'fred' + '@';
 addy58403 = addy58403 + 'domain' + '.' + 'com';
 document.write( '<a ' + path + '\'' + prefix + ':' + addy58403 + '\'>' );
 document.write( addy58403 );
 document.write( '<\/a>' );
 //-->\n </script> <script language='JavaScript' type='text/javascript'>
 <!--
 document.write( '<span style=\'display: none;\'>' );
 //-->
 </script>This e-mail address is being protected from spambots. You need JavaScript enabled to view it
 <script language='JavaScript' type='text/javascript'>
 <!--
 document.write( '</' );
 document.write( 'span>' );
 //-->
 </script> .';
				eval("if(field.getProperty('title')){fMessage_val_validate_email = field.getProperty('title');}");
				eval("cfvalidate_"+field.getProperty('name')+".add( Validate.Email, { failureMessage: fMessage_val_validate_email } );");
			}
			if(field.hasClass('validate-url')){
				var fMessage_val_validate_validate_url = 'Please enter a valid URL.';
				eval("if(field.getProperty('title')){fMessage_val_validate_validate_url = field.getProperty('title');}");
				eval("cfvalidate_"+field.getProperty('name')+".add( Validate.Format, { pattern: /^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i, failureMessage: fMessage_val_validate_validate_url } );");
			}
			if(field.hasClass('validate-date-au')){
				var fMessage_val_validate_date_au = 'Please use this date format: dd/mm/yyyy. For example 17/03/2006 for the 17th of March, 2006.';
				eval("if(field.getProperty('title')){fMessage_val_validate_date_au = field.getProperty('title');}");
				eval("cfvalidate_"+field.getProperty('name')+".add( Validate.Format, { pattern: /(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d/, failureMessage: fMessage_val_validate_date_au } );");
			}
			if(field.hasClass('validate-currency-dollar')){
				var fMessage_val_validate_currency_dollar = 'Please enter a valid $ amount. For example $100.00 .';
				eval("if(field.getProperty('title')){fMessage_val_validate_currency_dollar = field.getProperty('title');}");
				eval("cfvalidate_"+field.getProperty('name')+".add( Validate.Format, { pattern: /^\$?\-?([1-9]{1}[0-9]{0,2}(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9]{1}\d*(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$/, failureMessage: fMessage_val_validate_currency_dollar } );");
			}			
			Validate.One_Required = function(elm, paramsObj){
				var paramsObj = paramsObj || {};
				var message = paramsObj.failureMessage || "Must Choose one";
				var ready = false;
				var elm = paramsObj.elm;
				var p = elm.parentNode;
				var options = p.getElementsByTagName('INPUT');
				for(i=0; i<options.length; i++){
					if(options[i].checked == true) {
					  ready = true;
					}
				}
				if(!ready){
					Validate.fail(message);
				}
				return true;
			}
			if(field.hasClass('validate-one-required')){
				var fMessage_val_validate_one_required = 'Please select one of the options.';
				//if(field.size > 1)field.options[0].selected = true;
				eval("if(field.getProperty('title')){fMessage_val_validate_one_required = field.getProperty('title');}")
				eval("var cfvalidate_"+field.getProperty('name').replace('[]', '')+" = new LiveValidation(field, { validMessage: ' ', insertAfterWhatNode : field.parentNode });");
				eval("cfvalidate_"+field.getProperty('name').replace('[]', '')+".add( Validate.One_Required, { elm : field, failureMessage: fMessage_val_validate_one_required } );");
			}			
		}
	});
	
	$ES('select', $('ChronoContact_Parents_Newsletter_Signup')).each(function(field){
		eval("var cfvalidate_"+field.getProperty('name').replace('[]', '')+" = new LiveValidation(field, { validMessage: ' ' });");
		if(field.hasClass('validate-selection')){
			var fMessage_val_validate_selection = 'Please make a selection';
			if(field.size > 1)field.options[0].selected = true;
			eval("if(field.getProperty('title')){fMessage_val_validate_selection = field.getProperty('title');}");
			eval("cfvalidate_"+field.getProperty('name').replace('[]', '')+".add( Validate.Presence, { failureMessage: fMessage_val_validate_selection } );");
		}
	});	
	$ES('textarea', $('ChronoContact_Parents_Newsletter_Signup')).each(function(field){
		eval("var cfvalidate_"+field.getProperty('name').replace('[]', '')+" = new LiveValidation(field, { validMessage: ' ' });");
		if(field.hasClass('required')){
			var fMessage_val_required = 'This field is required';
			eval("if(field.getProperty('title')){fMessage_val_required = field.getProperty('title');}")
			eval("cfvalidate_"+field.getProperty('name').replace('[]', '')+".add( Validate.Presence, { failureMessage: fMessage_val_required } );");
		}
	});
		
	
	
	});
</script>		 
</div>
<p>
These are mailed to you periodically, and can be discontinued at any
time. In order to provide the above services your details will be placed
on our database, no information will be shared or sold to third
parties. For full details on privacy please read our privacy statement. 
</p>



</div>


						
			</div>
			
            			<div id="right_content">
            	                 <div class="panel">
					<div class="panelContents">
															<div class="moduletable">
					<table class="contentpaneopen">

	<tr><td class="contentheading">
				Family Learning Sessions			</td></tr>
</table>
	<table class="contentpaneopen">
			<tr><td valign="top">
			<p> Family Learning Sessions are provided for parents and other family members. These bespoke training sessions are tailored to the needs of each family and help to develop and improve skills allowing families to feel more confident in supporting the developments of the learner within their own home. For more details please contact <a href="mailto:education@westengland.ac.uk">education@westengland.ac.uk</a></p>	</td></tr>
		</table>

			</div>
	
											 </div>
					 <div class="panelBot"></div>
				 </div>
                             	            				</div>
        </div>
        			
		<div id="footer">
			<div id="footer_left">
											<div class="moduletableaddress">

					Topsham Rd, Countess Wear, Exeter, Devon, EX2 6HA<br />01392 454200		</div>
	
							</div>
			
			<div id="footer_right">
											<div class="moduletable">
					<table width="100%" border="0" cellpadding="0" cellspacing="1"><tr><td nowrap="nowrap"><a href="/dev/index.php?option=com_content&view=article&id=19&Itemid=36" class="mainlevel" >Terms</a><a href="/dev/index.php?option=com_content&view=article&id=18&Itemid=35" class="mainlevel" >Privacy</a><span class="mainlevel" >Charity Number: 1058937</span></td></tr></table>		</div>
	
							</div>

		</div>
	</div>
</div>



</body>
</html>



Just say if you need anything else.
GreyHead 17 Jun, 2009
Hi MonkofDoom,

Yes it helps, You have the Joomla E-mail cloaking plugin turned on and it is trying to cloak the sample email in the validation help.

I think this has been fixed in the more recent ChronoForms releases. Test by turning the Email Claoking plugin off and that should fix the problem. If you still need the plugin then change the order so taht is runs before the ChronoForms plugin (I think that's the right order, if not reverse it).

Bob
Monkofdoom 17 Jun, 2009
Thank you so much as always, moving the cloaking plugin up in order fixed the problem.

I am very greatful as always.
This topic is locked and no more replies can be posted.