return $this->destination;
}
+ public function set_form_title($title = '', $append = false) {
+ if (!empty($title)) {
+ if ($append) {
+ $this->form_title .= $title;
+ } else {
+ $this->form_title = $title;
+ }
+ }
+ }
+
public function set_destination($address = '') {
if (!empty($address)) {
$this->destination = $address;
class Consultation extends Base
{
public function __construct() {
- $this->form_title = __('Formulaire de consultation', 'ccv');
+ $this->set_form_title(__('Formulaire de consultation', 'ccv'));
}
public function register_scripts() {
public function pre_process() {
+ // Include patient name in subject line
+ $this->set_form_title(' - '. strtoupper($this->get_data('last-name')) .', '. $this->get_data('first-name') , true);
+
// Due to the complexity of the "Imagery" section of the form, there's no validation on these fields
// so it's possible to submit the form without ever selecting an imagery-type. In this case, we update
// the field value so it is clear to CCV that the client never filled out this section...
class Contact extends Base
{
public function __construct() {
- $this->form_title = __('Formulaire de contact', 'ccv');
+ $this->set_form_title(__('Formulaire de contact', 'ccv'));
}
function register_fields() {
]);
}
+
+ public function pre_process() {
+ // Include patient name in subject line
+ $this->set_form_title(' - '. strtoupper($this->get_data('last-name')) .', '. $this->get_data('first-name') , true);
+ }
}
class Training extends Base
{
public function __construct() {
- $this->form_title = __('Demande de formation', 'ccv');
+ $this->set_form_title(__('Demande de formation', 'ccv'));
}
function register_fields() {
]);
}
+
+ public function pre_process() {
+ // Include patient name in subject line
+ $this->set_form_title(' - '. strtoupper($this->get_data('last-name')) .', '. $this->get_data('first-name') , true);
+ }
}