function webform_chart_init in Webform Chart 7
Same name and namespace in other branches
- 7.2 webform_chart.module \webform_chart_init()
Implements hook_init().
This is a trick to be able to use AJAX in webform component edit page. The trick has been found here: https://drupal.org/node/1091354#comment-5323294 If someone find better, please fill free to help
File
- ./
webform_chart.module, line 278 - webform_chart.module
Code
function webform_chart_init() {
// Hack to fix webforms.
if ($_GET['q'] == 'system/ajax' && isset($_POST['form_id'])) {
foreach (webform_components() as $component_type => $component_info) {
webform_component_include($component_type);
}
}
}