well, I just want to COMPLETELY disable JavaScript validation in my form, I've tried around 5-6 different ways to do it, including core hacks - no way. What I achieved is removing of Behavior parts, script includes are still on their place. Here's what I am doing:
function Form() {
$fields = new FieldSet(
new CompositeField(
new HeaderField(_t('Member.MAINDATA', "Main data")),
new EmailField("Email", _t('Member.EMAIL', "Email", PR_MEDIUM, 'Noun')),
new PasswordField("Password", _t('Member.PASSWORD', 'Password'))
)
);
...
//pushing many other fields
...
$actions = new FieldSet(
new FormAction('register', 'Register')
);
$requiredFields = new RequiredFields();
$requiredFields->removeValidation(); // first way
$requiredFields->setJavascriptValidationHandler('none'); // second way - not working at all, figured out this var is always set to "prototype" in the end
$requiredFields->set_javascript_validation_handler('none'); // works, but "Valdator.js" and company includes are still here
$form = new Form($this, 'Form', $fields, $actions, $requiredFields);
return $form;
}
Question - how can I remove everything connected with prototype from my form? All my efforts end with JavaScript includes still here...
Another interesting thing is when I completely wiped out "includeJavascriptValidation" method from Validator it continues to add includes... Why the hell? Cache? Perhaps I just don't get it...
And another thing - is double call of "includeJavascriptValidation" really needed in Form.php? Found it in "FormAttributes" and "formHtmlContent"...
My version is 2.3.0 stable, if it does matter. Thanks!