/** * add our form section data to a static variable accessible by all form sections * * @param bool $return_for_subsection * @return void * @throws \EE_Error */ public function localize_validation_rules($return_for_subsection = FALSE) { // we only want to localize vars ONCE for the entire form, so if the form section doesn't have a parent, then it must be the top dog if ($return_for_subsection || !$this->parent_section()) { EE_Form_Section_Proper::$_js_localization['form_data'][$this->html_id()] = array('form_section_id' => $this->html_id(TRUE), 'validation_rules' => $this->get_jquery_validation_rules(), 'other_data' => $this->get_other_js_data(), 'errors' => $this->subsection_validation_errors_by_html_name()); EE_Form_Section_Proper::$_scripts_localized = true; } }