public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldsToTab('Root.Main', PhoneNumberField::create('Age', 'Age num'));
     $fields->addFieldsToTab('Root.Main', TextField::create('Job', 'Your Job'));
     return $fields;
 }
Beispiel #2
0
 public function ApplicationForm()
 {
     $fields = FieldList::create(TextField::create('Name', 'Full name'), EmailField::create('Email', 'Email address'), PhoneNumberField::create('Phone', 'Contact Phone number'), DropdownField::create('JobID', 'Which job are you applying for?', $this->AvailableJobs()->map('ID', 'Title'))->setEmptyString('(Select)'), TextareaField::create('Application', 'Enter your experience and skills'));
     $actions = FieldList::create(FormAction::create('processApplication', 'Apply'));
     $validator = RequiredFields::create(array('Name', 'Email', 'Phone', 'JobID', 'Application'));
     $form = Form::create($this, 'ApplicationForm', $fields, $actions, $validator);
     return $form;
 }
Beispiel #3
0
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldToTab('Root.Main', UploadField::create('Photo'), 'Content');
     $fields->addFieldToTab('Root.Main', UploadField::create('PDF'), 'Content');
     $fields->addFieldToTab('Root.Main', PhoneNumberField::create('Phone'), 'Content');
     $fields->addFieldToTab('Root.Main', EmailField::create('Email'), 'Content');
     $fields->addFieldToTab('Root.Main', DropdownField::create('RoleID', 'Role', Role::get()->map('ID', 'Title'))->setEmptyString('(Select)'), 'Content');
     $fields->addFieldToTab('Root.Main', DropdownField::create('DepartmentID', 'Department', Department::get()->map('ID', 'Title'))->setEmptyString('(Select)'), 'Content');
     return $fields;
 }
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldToTab("Root.Main", new TextField("textfield", "Text field"), 'Metadata');
     $fields->addFieldToTab("Root.Main", new TextAreaField("textarea", "Textarea"), 'Metadata');
     $fields->addFieldToTab('Root.Main', new CheckboxField('ShowInSearch', 'Show in search?'), 'Metadata');
     $fields->addFieldToTab('Root.Main', OptionsetField::create('Icon', 'Icon', array(1 => 'option 1', 2 => 'option 2')), 'Metadata');
     $fields->addFieldToTab('Root.Main', new HTMLEditorField('Description', 'Description'), 'Metadata');
     $fields->addFieldToTab('Root.Main', new HiddenField('Referrer', 'Referrer', 'listview'), 'Metadata');
     $fields->addFieldToTab('Root.Main', new DateField('datefoeld'), 'Metadata');
     $fields->addFieldToTab('Root.Main', EmailField::create('Email', 'Email'), 'Metadata');
     $fields->addFieldToTab('Root.Main', PhoneNumberField::create('Phone', 'Phone'), 'Metadata');
     return $fields;
 }
 public function getShippingFields()
 {
     $fields = array("shippingAddress1" => TextField::create('shippingAddress1', _t("PaymentForm.SHIPPINGADDRESS1", "Shipping Address")), "shippingAddress2" => TextField::create('shippingAddress2', _t("PaymentForm.SHIPPINGADDRESS2", "Shipping Address 2")), "city" => TextField::create('shippingCity', _t("PaymentForm.SHIPPINGCITY", "Shipping City")), "postcode" => TextField::create('shippingPostcode', _t("PaymentForm.SHIPPINGPOSTCODE", "Shipping Postcode")), "state" => TextField::create('shippingState', _t("PaymentForm.SHIPPINGSTATE", "Shipping State")), "country" => TextField::create('shippingCountry', _t("PaymentForm.SHIPPINGCOUNTRY", "Shipping Country")), "phone" => PhoneNumberField::create('shippingPhone', _t("PaymentForm.SHIPPINGPHONE", "Shipping Phone")));
     $this->cullForGateway($fields);
     return FieldList::create($fields);
 }
 /**
  * Get shipping address fields
  * @return \FieldList
  */
 public function getShippingFields()
 {
     $fields = array('shippingAddress1' => \TextField::create('shippingAddress1', _t('PaymentForm.ShippingAddress1', 'Shipping Address')), 'shippingAddress2' => \TextField::create('shippingAddress2', _t('PaymentForm.ShippingAddress2', 'Shipping Address 2')), 'city' => \TextField::create('shippingCity', _t('PaymentForm.ShippingCity', 'Shipping City')), 'postcode' => \TextField::create('shippingPostcode', _t('PaymentForm.ShippingPostcode', 'Shipping Postcode')), 'state' => \TextField::create('shippingState', _t('PaymentForm.ShippingState', 'Shipping State')), 'country' => \TextField::create('shippingCountry', _t('PaymentForm.ShippingCountry', 'Shipping Country')), 'phone' => \PhoneNumberField::create('shippingPhone', _t('PaymentForm.ShippingPhone', 'Shipping Phone')));
     $this->cullForGateway($fields);
     return \FieldList::create($fields);
 }