var contract=$CS.getValue("WorkOrder_Fields_UDF_CHAR5");
var subject=$CS.getValue("SUBJECT");
var new_subject = subject + " : " + contract;
if($CS.isFormSubmit()){
$CS.setValue("SUBJECT", new_subject);
}
Below is the Field and Form Rule that you have to create it in the specific template under On Form Submit.