function __construct($controller, $name) { $current_user = Member::currentUser(); $fields = new FieldList($this->first_name_field = new TextField('FirstName', 'First name / Given name', $current_user->FirstName), $this->last_name_field = new TextField('Surname', 'Last name / Family name', $current_user->Surname), $os_activity = new CustomCheckboxSetField('OpenStackActivity', 'Which of the following do you yourself personally do?<BR>Select All That Apply', DeploymentSurveyOptions::$activities_options), $os_relationship = new TextAreaField('OpenStackRelationship', 'Please describe your relationship with OpenStack'), $this->email_field = new TextField('Email', 'Your Email', $current_user->Email), $ok_2_contact = new CheckboxField('OkToContact', 'The OpenStack Foundation and User Committee may communicate with me in the future about my usage.')); $os_relationship->addExtraClass('hidden'); $os_relationship->setColumns(30); $ok_2_contact->setValue(0); $this->email_field->setDisabled(true); $nextButton = new FormAction('NextStep', ' Next Step '); $actions = new FieldList($nextButton); $validator = new RequiredFields(); Requirements::javascript('surveys/js/deployment_survey_aboutyou_form.js'); parent::__construct($controller, $name, $fields, $actions, $validator); }