In ChronoForms v3 I have the option to give a validation message onBlur, so if somebody leaves some field empty, changing the field focus, he get an instant advice.
[attachment=0]onBlur.png[/attachment]
In ChronoForms v4 I get the JS Validation messages only “on submit".
I missed something (or broken it)?
[attachment=0]onBlur.png[/attachment]
In ChronoForms v4 I get the JS Validation messages only “on submit".
I missed something (or broken it)?
I’ve just added at line 179 of administrator/components/com_chronoforms/form_actions/show_html/cfaction_show_html.php file the options
so the function becomes:
but I hope I’ve missed a configuration panel in the GUI.
display : {
errorsLocation : 1,
indicateErrors : 2,
keepFocusOnError : 0,
closeTipsButton : 0,
showErrors : 1
}
so the function becomes:
function _loadValidationScripts($form){
$document =& JFactory::getDocument();
JHTML::_('behavior.mootools');
global $mainframe;
$CF_PATH = ($mainframe->isSite()) ? JURI::Base() : $mainframe->getSiteURL();
$document->addStyleSheet($CF_PATH.'components/com_chronoforms/css/formcheck/theme/'.$form->form_params->get('jsvalidation_theme', 'classic').'/formcheck.css');
$document->addScript($CF_PATH.'components/com_chronoforms/js/formcheck/formcheck-yui.js');
$document->addScript($CF_PATH.'components/com_chronoforms/js/formcheck/formcheck-max.js');
$document->addScript($CF_PATH.'components/com_chronoforms/js/formcheck/lang/'.$form->form_params->get('jsvalidation_lang', 'en').'.js');
ob_start();
?>
//<![CDATA[
window.addEvent('domready', function() {
<?php if($form->form_params->get('jsvalidation_errors', 1)): ?>
formCheck = new FormCheckMax('<?php echo 'chronoform_'.$form->form_name; ?>', {
<?php else: ?>
formCheck = new FormCheck('<?php echo 'chronoform_'.$form->form_name; ?>', {
<?php endif; ?>
display : {
errorsLocation : 1,
indicateErrors : 2,
keepFocusOnError : 0,
closeTipsButton : 0,
showErrors : 1
}
});
});
//]]>
<?php
$script = ob_get_clean();
$document->addScriptDeclaration($script);
}
but I hope I’ve missed a configuration panel in the GUI.
Hi mat,
I don't think that the official actions allow you to configure the Validation code like this. But I have developed an unofficial version that has a configuration box. Please see this post
Bob
I don't think that the official actions allow you to configure the Validation code like this. But I have developed an unofficial version that has a configuration box. Please see this post
Bob
This topic is locked and no more replies can be posted.