protected function createContactForm()
    {
        $form = UserDefinedForm::create(array(
            'Title' => 'Contact',
            'URLSegment' => 'contact',
            'Content' => '<p>$UserDefinedForm</p>',
            'SubmitButtonText' => 'Submit',
            'ClearButtonText' => 'Clear',
            'OnCompleteMessage' => "<p>Thanks, we've received your submission and will be in touch shortly.</p>",
            'EnableLiveValidation' => true
        ));

        $form->write();

        // Add form fields
        $fields = array(
            EditableFormStep::create([
                'Title' => _t(
                    'SilverStripe\\UserForms\\Model\\EditableFormField\\EditableFormStep.TITLE_FIRST',
                    'First Page'
                )
            ]),
            EditableTextField::create([
                'Title' => 'Name',
                'Required' => true,
                'RightTitle' => 'Please enter your first and last name'
            ]),
            EditableEmailField::create([
                'Title' => Email::class,
                'Required' => true,
                'Placeholder' => 'example@example.com'
            ]),
            EditableTextField::create([
                'Title' => 'Subject'
            ]),
            EditableTextField::create([
                'Title' => 'Message',
                'Required' => true,
                'Rows' => 5
            ])
        );

        foreach ($fields as $field) {
            $field->write();
            $form->Fields()->add($field);
            $field->copyVersionToStage(Versioned::DRAFT, Versioned::LIVE);
        }

        $form->copyVersionToStage(Versioned::DRAFT, Versioned::LIVE);
        $form->flushCache();

        $this->output(' + Created "contact" UserDefinedForm page');

        return $this;
    }