Email Form

Create a form that displays on your website and e-mails the submissions to you.

Copy and Paste the code from below into the "Code" mode of a content block. To do this, use the drop down box when you are editing the contentlet to change it from WYSIWYG to CODE.

After the base code is pasted, make the following changes:

  1. RENAME the form by replacing "formName" with something relevant to your form, such as EducationClubFeedbackForm. Do not include any spaces in your name, and make sure it's very unique.
  2. Replace receiver@marywood.edu with your e-mail address, so that when the form is submitted it will be sent to you.
  3. in the input line of code that contains name="subject", change the value="Rename This" to an appropriate subject line, such as "Education Club Feedback Form Submission"
  4. Change FormDatabasename to the same thing that you named the form in Step 1. Remember, no spaces!
  5. Save and publish to make your form live. You can then test the form from a different browser to make sure it works and e-mails to you.


Contact Web Development if you need more advanced features or get confused. We can set up a contact/feedback form for you very easily!

Copy This Code

<!--RENAME the form by replacing "formName" in the line below-->
<form name="formName" method="post" 
action="/dotCMS/submitWebForm" onSubmit="return checkForm()">
<input name="from" type="hidden"value="webform@marywood.edu">

<!--ENTER the email address to send the form to -->
<input name="to" value="receiver@marywood.edu" type="hidden">


<!--RENAME the 'value' box to set subject of sent form-->
<input type="hidden" name="subject" id="subject" value="Rename This"/>


<!--You should make a 'thank-you.html' in this directory; 
the user will be directed there after filling out the form-->
<input type="hidden" name="errorURL" id="errorURL" value="/form/error.html">
<input type="hidden" name="returnUrl" id="returnUrl"
value="/form/thank-you.html" />


<input type="hidden" name="html" id="html" value="1" />


<!--The value here is the name that the form data will be
 stored under in the CMS database, just pick something clear-->
<input type="hidden" name="formType" id="formType" 
value="FormDatabasename">


<!--DUMMY example below-->
<!--DO NOT use a textarea!!!!!!!
Use the following macro instead:
#textArea("myName" "width:200px")
-->
<fieldset>
<legend>Form Piece Title</legend>
<dl>
<dt>Name</dt>
<dd><input name="name" value="" size="30" type="text"></dd>
<br>
<dt>Attending?</dt>
<dd><input name="checkattend" value="yes" type="checkbox">
yes</dd>
<br>
<dt>Comments</dt>
<dd>#textArea("Comments" "width:200px")</dd>
</dl>
</fieldset>
<input value="Reset" type="reset">

<input type="submit" name="submit" value="Submit">
  
</form>​

Email Form Looks Like This:

Form Piece Title
Name

Attending?
yes

Comments
See it in action on a Marywood Department site!