Commit fd2ffb7d authored by jelles's avatar jelles
Browse files

Issue #2136509 by Strae: Activate client side validation for a dynamic (ajax)...

Issue #2136509 by Strae: Activate client side validation for a dynamic (ajax) created form JS error.
parent 7c6f65bf
......@@ -33,6 +33,14 @@ function clientside_validation_js_alter(&$javascript) {
$javascript['settings']['data'][] = $clientside_validation_settings;
}
function clientside_validation_ajax_render_alter(&$commands) {
$cv_settings = &drupal_static('clientside_validation_settings', array());
foreach ($commands as $delta => $command) {
if ($command['command'] == 'settings') {
$commands[$delta]['settings'] = drupal_array_merge_deep($command['settings'], $cv_settings);
}
}
}
/**
* Implements hook_menu().
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment