public function alterCommentForm(Form $form) { $form->transform(new FoundationFormTransformation()); $form->setTemplate('FoundationCommentingControllerForm', 'FoundationForm', 'Form'); $form->addExtraClass('custom'); if ($form->hasExtension('FormSpamProtectionExtension')) { $form->enableSpamProtection(); } }
public function alterCommentForm(Form $form) { $form->Fields()->bootstrapify(); $form->Actions()->bootstrapify(); $form->setTemplate('FoundationCommentingControllerForm', 'FoundationForm'); if ($form->hasExtension('FormSpamProtectionExtension')) { $form->enableSpamProtection(); } Requirements::css(FOUNDATIONFORMS_DIR . '/css/foundationforms.css'); }
/** * @uses MemberProfilePage_Controller::getProfileFields * @return Form */ public function RegisterForm() { $form = new Form($this, 'RegisterForm', $this->getProfileFields('Registration'), new FieldList(new FormAction('register', _t('MemberProfiles.REGISTER', 'Register'))), new MemberProfileValidator($this->Fields())); if ($form->hasExtension('FormSpamProtectionExtension')) { $form->enableSpamProtection(); } $this->extend('updateRegisterForm', $form); return $form; }