/** * Create an element for the bank's name. * * @param string $fieldName * @param string $errorMessage * @return Customweb_Form_Element */ public static function getBankNameElement($fieldName, $errorMessage = null) { $control = new Customweb_Form_Control_TextInput($fieldName); $control->addValidator(new Customweb_Form_Validator_NotEmpty($control, Customweb_I18n_Translation::__("You have to enter the name of your bank."))); $control->setAutocomplete(false); $element = new Customweb_Form_Element(Customweb_I18n_Translation::__('Bank Name'), $control, Customweb_I18n_Translation::__('Please enter the name of your bank.')); $element->setElementIntention(Customweb_Form_Intention_Factory::getBankNameIntention())->setErrorMessage($errorMessage); return $element; }