Have created a new form and only just realized that when there is an error it does not pop up the usual error message when hitting submit, the form has to load the &event=submit page before it then shows the error via the Joomla error message announcement.
On all the other forms the error pop up works and as far as i can see all the settings are the same as the other forms, apart the other forms were created in an earlier version of Chrono and were carried over when i upgraded it.
The form does work in all the other areas and submits properly if there are no errors.
This is the form HTML CODE
Is this because of the HTML or a bug due to added JS code? Any help will be appreciated!
On all the other forms the error pop up works and as far as i can see all the settings are the same as the other forms, apart the other forms were created in an earlier version of Chrono and were carried over when i upgraded it.
The form does work in all the other areas and submits properly if there are no errors.
This is the form HTML CODE
<?php
if ( !$mainframe->isSite() ) { return; }
/*
function to generate a random alpha-numeric code
using a specified pattern
*
* @param $pattern string
* @return string
*/
function generateIdent($pattern='AA9999A')
{
$alpha = array("A","B","C","D","E","F","G","H",
"J","K","L","M","N","P","Q","R","S","T","U","V","W",
"X","Y","Z");
$digit = array("1","2","3","4","5","6","7","8","9");
$return = "";
$pattern_array = str_split($pattern, 1);
foreach ( $pattern_array as $v ) {
if ( is_numeric($v) ) {
$return .= $digit[array_rand($digit)];
} elseif ( in_array(strtoupper($v), $alpha) ) {
$return .= $alpha[array_rand($alpha)];
} else {
$return .= " ";
}
}
return $return;
}
?>
<?php
$ident = generateIdent();
?>
<input type='hidden' name='ident' id='ident'
value='<?php echo $ident; ?>' />
<div class="ccms_form_element cfdiv_header" id="_h1_actsco_printing_2012_daily_planner_h1___container_div"><h1>Daily Planner</h1><div class="clear"></div></div>
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">text here</span></p>
<p></p>
<div class="ccms_form_element cfdiv_text" id="full_name_container_div"><label>Full Name</label><input maxlength="150" size="30" class=" validate['required']" title="" label_over="0" hide_label="0" type="text" value="" name="input_name" />
<div class="clear"></div><div id="error-message-input_name"></div></div><div class="ccms_form_element cfdiv_text" id="email_address_container_div"><label>Email Address</label><input maxlength="150" size="30" class=" validate['required','email']" title="" label_over="0" hide_label="0" type="text" value="" name="input_email" />
<div class="clear"></div><div id="error-message-input_email"></div></div><div class="ccms_form_element cfdiv_text" id="phone_number_container_div"><label>Phone Number</label><input maxlength="150" size="30" class=" validate['required','phone']" title="" label_over="0" hide_label="0" type="text" value="" name="input_phone" />
<div class="clear"></div><div id="error-message-input_phone"></div></div><div class="ccms_form_element cfdiv_textarea" id="shipping_address_container_div"><label>Shipping Address</label><textarea cols="45" rows="12" class=" validate['required']" title="" label_over="0" hide_label="0" type="textarea" name="input_shipping_address"></textarea>
<div class="clear"></div><div id="error-message-input_shipping_address"></div></div><table border="0" class="mceItemTable"><tbody><tr><td><div class="ccms_form_element cfdiv_text" id="how_many_would_you_like_container_div"><label>How many would you like</label><input id="input_copies" maxlength="150" size=20" class=" validate['required','number']" title="" label_over="0" hide_label="0" type="text" value="" name="input_copies" />
<div class="clear"></div><div id="error-message-input_copies"></div></div></td><td><div class="ccms_form_element cfdiv_text" id="to_pay__container_div"><label>To Pay...</label><input id="amount" maxlength="150" size="5" class="" title="" label_over="0" hide_label="0" type="text" value="" name="amount" /><div class="clear"></div><div id="error-message-amount"></div></div></td></tr></tbody></table><div class="ccms_form_element cfdiv_text" id="please_enter_captcha_container_div"><label>Please enter Captcha</label><input maxlength="150" size="17" class="chrono_captcha_input validate['required']" title="" type="text" value="" name="chrono_verification" />
{chronocaptcha_img}<div class="clear"></div><div id="error-message-chrono_verification"></div></div><div class="ccms_form_element cfdiv_submit" id="input_submit_6_container_div"><input name="input_submit_6" class="" value="Submit" type="submit" />
<div class="clear"></div><div id="error-message-input_submit_6"></div></div>
Is this because of the HTML or a bug due to added JS code? Any help will be appreciated!