Add javascript settings properties inside hook_form_alter via #attached

Public

Get raw version
php
  1. //put into hook_form_alter or similar
  2. $settings_array = array('mymodule' => array('property' => 'value'));
  3. $form['#attached']['js'][] = array('data' => $settings_array, 'type' => 'setting');