com.nurelm.util
Class FormUtil

java.lang.Object
  extended bycom.nurelm.util.FormUtil

public class FormUtil
extends java.lang.Object

DOCUMENT ME!


Constructor Summary
FormUtil()
           
 
Method Summary
static java.lang.String emailForm(java.lang.String formName, java.lang.String[] emailTo, java.lang.String emailFrom, java.lang.String subject, java.lang.String successMessage, java.lang.String formFields, java.lang.String showEmptyFields, javax.servlet.http.HttpServletRequest request)
          Emails form data to a specified email address.
 void FormUtil()
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormUtil

public FormUtil()
Method Detail

FormUtil

public void FormUtil()
DOCUMENT ME!


emailForm

public static java.lang.String emailForm(java.lang.String formName,
                                         java.lang.String[] emailTo,
                                         java.lang.String emailFrom,
                                         java.lang.String subject,
                                         java.lang.String successMessage,
                                         java.lang.String formFields,
                                         java.lang.String showEmptyFields,
                                         javax.servlet.http.HttpServletRequest request)
                                  throws NuPlatformException,
                                         java.lang.Exception
Emails form data to a specified email address. Works in conjunction with com.nurelm.client.cms.TagEmailForm.java. Five String fields are required: formName, emailTo, emailFrom, subject and formFields. In the Web form, these should be defined as form_name, email_to, email_from, subject and form_fields. If all five are null, then an empty String is immediately returned. This is because the page which contains TagEmailForm could be hit directly. In this case, we do not want to do any number crunching. Otherwise, if one or more of the required fields are not set, we throw a NuPlatformException. Optional hidden fields: successMessage & showEmptyFields. in the Web form, these should be defined as success_message and show_empty_fields. success_message defaults to a nice note. show_empty_fields defaults to true - the default is to show the field names even if a value does not exist for that field. If all is well, we grab the form fields from the request object, create an e-mail message made up of the fields, and e-mail it.

Parameters:
formName - DOCUMENT ME!
emailTo - DOCUMENT ME!
emailFrom - DOCUMENT ME!
subject - DOCUMENT ME!
successMessage - DOCUMENT ME!
formFields - DOCUMENT ME!
showEmptyFields - DOCUMENT ME!
request - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
NuPlatformException - DOCUMENT ME!
java.lang.Exception - DOCUMENT ME!