/** * Create an element for the bank's location. * * @param string $fieldName * @param string $errorMessage * @return Customweb_Form_Element */ public static function getBankLocationElement($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 location of your bank."))); $control->setAutocomplete(false); $element = new Customweb_Form_Element(Customweb_I18n_Translation::__('Bank Location'), $control, Customweb_I18n_Translation::__('Please enter the location of your bank.')); $element->setElementIntention(Customweb_Form_Intention_Factory::getBankLocationIntention())->setErrorMessage($errorMessage); return $element; }