/** * This method creates a bank code element. * * @param string $fieldName * The field name of the bank code element * @return Customweb_Form_IElement */ public static function getBankCodeElement($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 bank code of your bank."))); $control->setAutocomplete(false); $element = new Customweb_Form_Element(Customweb_I18n_Translation::__('Bank code number'), $control, Customweb_I18n_Translation::__('Please enter here the bank code of your bank.')); $element->setElementIntention(Customweb_Form_Intention_Factory::getAccountNumberIntention())->setErrorMessage($errorMessage); return $element; }