function ytarget_set_goal in Webform Yandex Goals 7.2
Same name and namespace in other branches
- 7 ytarget.module \ytarget_set_goal()
1 string reference to 'ytarget_set_goal'
File
- ./
ytarget.module, line 122
Code
function ytarget_set_goal($form, &$form_state) {
form_state_values_clean($form_state);
$nid = $form_state['values']['nid'];
$goal = check_plain($form_state['values']['goal']);
if (!empty($goal)) {
$goals = variable_get('ytarget_goals', array());
$goals[$nid] = $goal;
variable_set('ytarget_goals', $goals);
drupal_set_message(t('The target has been updated'));
}
}