How to add custom class in body tag on form submit?
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.