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

public class Form2EmailForm extends BaseForm
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 Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • log

      static org.apache.commons.logging.Log log
    • formType

      private String formType
    • textFromImage

      private String textFromImage
    • emailerOptInApproval

      private String emailerOptInApproval
    • emailerMultipleListOptInApproval

      private String[] emailerMultipleListOptInApproval
  • Constructor Details

    • Form2EmailForm

      public Form2EmailForm()
  • Method Details

    • getFormType

      public String getFormType()
    • setFormType

      public void setFormType(String formType)
    • getTextFromImage

      public String getTextFromImage()
    • setTextFromImage

      public void setTextFromImage(String textFromImage)
    • getEmailerOptInApproval

      public String getEmailerOptInApproval()
    • setEmailerOptInApproval

      public void setEmailerOptInApproval(String emailerOptInApproval)
    • getEmailerMultipleListOptInApproval

      public String[] getEmailerMultipleListOptInApproval()
    • setEmailerMultipleListOptInApproval

      public void setEmailerMultipleListOptInApproval(String[] emailerMultipleListOptInApproval)
    • validate

      public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
      Overrides:
      validate in class org.apache.struts.action.ActionForm
    • isFieldValid

      public boolean isFieldValid(String field, String value)
    • constructEmailText

      public String constructEmailText(javax.servlet.http.HttpServletRequest request)
    • constructEmailHTML

      public String constructEmailHTML(javax.servlet.http.HttpServletRequest request)