How to add custom class in body tag on form submit? I have created custom module with custom form, in which I have added input type select. Form submission is working fine, but I wanted set select option value as custom class for BODY tag.
You can add through custom hook.

 function mytheme_preprocess_html(&amp;$vars) {
  $vars['classes_array'][] = 'new-class';
}


OR

function YOUR_THEME_preprocess_html(&amp;$vars) {
  $path = 'your-drupal-page';
  if (drupal_match_path($_GET['q'], $path) || drupal_match_path(drupal_get_path_alias($_GET['q']), $path)) {
    $vars['classes_array'][] = 'page-my-css-class';
  }
}


If you have any query related how to create then you can check this LINK.