New Client Form

Scammell & Co Lawyers — More Experience | Better Outcomes

Please complete your details below. When you click "Submit," this is sent straight to our reception team to open your file — nothing further to do on your end.

Personal details







Contact details








Occupation



A little more about you




'Could not read the submitted details.' ) );
}

$get = function ( $key ) use ( $data ) {
return isset( $data[ $key ] ) ? sanitize_text_field( $data[ $key ] ) : '';
};

$field_labels = array(
'title' => 'Title',
'firstName' => 'First name',
'middleName' => 'Middle name',
'lastName' => 'Last name',
'dob' => 'Date of birth',
'countryOfBirth' => 'Country of birth',
'address' => 'Residential address',
'suburb' => 'Suburb',
'postcode' => 'Postcode',
'mobile' => 'Mobile number',
'homePhone' => 'Home number',
'email' => 'Email address',
'occupation' => 'Occupation',
'employer' => 'Employer',
'previousLawyer' => 'Previous lawyer at the firm',
'howHeard' => 'How they heard about the firm',
);

$full_name = trim( $get( 'title' ) . ' ' . $get( 'firstName' ) . ' ' . $get( 'middleName' ) . ' ' . $get( 'lastName' ) );
$full_name = preg_replace( '/\s+/', ' ', $full_name );

$lines = array();
$lines[] = 'New client form submission';
$lines[] = 'Submitted: ' . current_time( 'd/m/Y g:ia' );
$lines[] = '';

foreach ( $field_labels as $key => $label ) {
$value = $get( $key );
if ( '' !== $value ) {
$lines[] = $label . ': ' . $value;
}
}

$preferred_contact = $get( 'preferredContact' );
if ( $preferred_contact ) {
$lines[] = 'Preferred method of contact: ' . $preferred_contact;
}

$previous_client = $get( 'previousClient' );
if ( $previous_client ) {
$lines[] = 'Previous client of Scammell & Co.: ' . $previous_client;
}

$body = implode( "\n", $lines );

$subject = 'New client form — ' . ( $full_name ? $full_name : 'Unnamed submission' );
$headers = array( 'Content-Type: text/plain; charset=UTF-8' );

$client_email = sanitize_email( isset( $data['email'] ) ? $data['email'] : '' );
if ( $client_email && is_email( $client_email ) ) {
$headers[] = 'Reply-To: ' . $client_email;
}

$sent_to_firm = wp_mail( SCL_NEWCLIENT_FIRM_EMAIL, $subject, $body, $headers );

// Acknowledgement email back to the client.
$ack_sent = false;
if ( $client_email && is_email( $client_email ) ) {
$greeting_name = $get( 'firstName' ) ? $get( 'firstName' ) : 'there';

$ack_subject = "We've received your details — Scammell & Co Lawyers";
$ack_body = "Hi {$greeting_name},\n\n";
$ack_body .= "Thanks for getting in touch. We've received the details you submitted and our reception team will be in contact shortly to open your file.\n\n";
$ack_body .= "If anything above needs correcting in the meantime, just reply to this email.\n\n";
$ack_body .= "Kind regards,\nScammell & Co Lawyers\nMore Experience | Better Outcomes";

$ack_headers = array( 'Content-Type: text/plain; charset=UTF-8' );
$ack_sent = wp_mail( $client_email, $ack_subject, $ack_body, $ack_headers );
}

if ( $sent_to_firm ) {
wp_send_json_success( array( 'ack_sent' => $ack_sent ) );
} else {
wp_send_json_error( array( 'message' => 'The form could not be sent — please call the office instead.' ) );
}
}
add_action( 'wp_ajax_scl_newclient_submit', 'scl_newclient_handle_submit' );
add_action( 'wp_ajax_nopriv_scl_newclient_submit', 'scl_newclient_handle_submit' );

Logo of Scammell & Co Lawyers, a legal firm in Adelaide
ABN 19 668 739 151
Copyright 2025 Scammell & Co. Lawyers Pty Ltd. All rights reserved.
Liability limited by a scheme approved under Professional Standards Legislation.