Class Form2EmailForm
java.lang.Object
org.apache.struts.action.ActionForm
com.softslate.commerce.customer.core.BaseForm
com.softslate.commerce.customer.core.Form2EmailForm
- All Implemented Interfaces:
Serializable
Struts form class for submissions to the contact form and other form-to-email
forms.
The validate method of this class checks to make sure a "formType" parameter is present. The form type is used to look up which fields are validated, and required. They are looked up in the application settings by finding settings whose codes match 'requiredFields<formType>' and 'validatedFields<formType>'.
If the "useImageVerificationWithContactForms" setting is set, it checks the entered text against the Jcaptcha image that was presented.
- Author:
- David Tobey
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String[]private Stringprivate String(package private) static org.apache.commons.logging.Logprivate static final longprivate StringFields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconstructEmailHTML(javax.servlet.http.HttpServletRequest request) constructEmailText(javax.servlet.http.HttpServletRequest request) String[]booleanisFieldValid(String field, String value) voidsetEmailerMultipleListOptInApproval(String[] emailerMultipleListOptInApproval) voidsetEmailerOptInApproval(String emailerOptInApproval) voidsetFormType(String formType) voidsetTextFromImage(String textFromImage) org.apache.struts.action.ActionErrorsvalidate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request) Methods inherited from class com.softslate.commerce.customer.core.BaseForm
formUtils, getBusinessObjectFactory, getErrors, getMapping, getMessage, getMessages, getRequest, getSettings, getUser, html5OrXhtml, initializeProperties, setBusinessObjectFactory, setErrors, setMapping, setMessages, setRequest, setSettings, setUserMethods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, reset, setMultipartRequestHandler, setServlet, validate
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
log
static org.apache.commons.logging.Log log -
formType
-
textFromImage
-
emailerOptInApproval
-
emailerMultipleListOptInApproval
-
-
Constructor Details
-
Form2EmailForm
public Form2EmailForm()
-
-
Method Details
-
getFormType
-
setFormType
-
getTextFromImage
-
setTextFromImage
-
getEmailerOptInApproval
-
setEmailerOptInApproval
-
getEmailerMultipleListOptInApproval
-
setEmailerMultipleListOptInApproval
-
validate
public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request) - Overrides:
validatein classorg.apache.struts.action.ActionForm
-
isFieldValid
-
constructEmailText
-
constructEmailHTML
-