diff --git a/booking.register.inc b/booking.register.inc index 13897d0..175e586 100644 --- a/booking.register.inc +++ b/booking.register.inc @@ -878,8 +878,8 @@ function booking_form_submit($form, &$form_state) { $node->created = REQUEST_TIME; $node->changed = REQUEST_TIME; - $node->booking_firstname = trim($values['booking_firstname']); - $node->booking_lastname = trim($values['booking_lastname']); + $node->booking_firstname = ucwords(trim($values['booking_firstname'])); + $node->booking_lastname = ucwords(trim($values['booking_lastname'])); $node->booking_gender = $values['booking_gender']; $node->booking_dob = $dob; $node->booking_status = 0; //zero means not yet coming. Only change to 1 when a payment is made @@ -895,8 +895,8 @@ function booking_form_submit($form, &$form_state) { // EVENTID, $values['booking_worker_type'] )); $node->booking_payment_id = $values['booking_payment_id']; - $node->booking_street = $values['booking_street']; - $node->booking_suburb = $values['booking_suburb']; + $node->booking_street = ucwords($values['booking_street']); + $node->booking_suburb = ucwords($values['booking_suburb']); $node->booking_postcode = $values['booking_postcode']; $node->booking_country = $values['booking_country']; @@ -904,16 +904,16 @@ function booking_form_submit($form, &$form_state) { if ($values['booking_state'] == 'Other') { $node->booking_state = $values['booking_other_state']; } else { - $node->booking_state = $values['booking_state']; + $node->booking_state = ucwords($values['booking_state']); } $node->booking_phone = $values['booking_phone']; $node->booking_mobile = $values['booking_mobile']; - $node->booking_email = $values['booking_email']; - $node->booking_ecclesia = $values['booking_ecclesia']; + $node->booking_email = strtolower($values['booking_email']); + $node->booking_ecclesia = ucwords($values['booking_ecclesia']); $node->booking_baptised = ($values['booking_baptised'] == 1 ? 'Y' : 'N'); $node->booking_married = ($values['booking_married'] == 1 ? 'Y' : 'N'); - $node->booking_partner_name = $values['booking_partner_name']; + $node->booking_partner_name = ucwords($values['booking_partner_name']); $node->booking_partner_id = empty($values['booking_partner_id']) ? 0 : $values['booking_partner_id']; //emergency contact info @@ -1046,8 +1046,8 @@ function _booking_insert($node) { ->fields(array( 'nid' => $node->nid, 'booking_event_id' => $node->booking_event_id, - 'booking_firstname' => ucwords($node->booking_firstname), - 'booking_lastname' => ucwords($node->booking_lastname), + 'booking_firstname' => $node->booking_firstname, + 'booking_lastname' => $node->booking_lastname, 'booking_dob' => $node->booking_dob, 'booking_passport_num' => $node->booking_passport_num, 'booking_passport_issue_location' => $node->booking_passport_issue_location, @@ -1063,10 +1063,10 @@ function _booking_insert($node) { 'booking_mobile' => $node->booking_mobile, 'booking_email' => $node->booking_email, 'booking_timestamp' => $node->booking_timestamp, - 'booking_ecclesia' => ucwords($node->booking_ecclesia), + 'booking_ecclesia' => $node->booking_ecclesia, 'booking_baptised' => $node->booking_baptised, 'booking_married' => $node->booking_married, - 'booking_partner_name' => ucwords($node->booking_partner_name), + 'booking_partner_name' => $node->booking_partner_name, 'booking_partner_id' => $node->booking_partner_id, 'booking_room_mate1' => $node->booking_room_mate1, 'booking_room_mate2' => $node->booking_room_mate2,