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
Modifier and TypeFieldDescriptionprivate String[]
private String
private String
(package private) static org.apache.commons.logging.Log
private static final long
private String
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconstructEmailHTML
(javax.servlet.http.HttpServletRequest request) constructEmailText
(javax.servlet.http.HttpServletRequest request) String[]
boolean
isFieldValid
(String field, String value) void
setEmailerMultipleListOptInApproval
(String[] emailerMultipleListOptInApproval) void
setEmailerOptInApproval
(String emailerOptInApproval) void
setFormType
(String formType) void
setTextFromImage
(String textFromImage) org.apache.struts.action.ActionErrors
validate
(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, setUser
Methods 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:
validate
in classorg.apache.struts.action.ActionForm
-
isFieldValid
-
constructEmailText
-
constructEmailHTML
-