Creating a custom form outside of the CMS
1. Create a new Standard Page in the CMS
2. Select the HTML button to write custom code
3. At the very top of the HTML source, you must enter the following line of code in order for the form to send.
<form action="http://www.cornellcollege.edu/php/formmail/" enctype="multipart/form-data" method="POST">
This is the php file that configures the connection between the form and the database. The text that goes in this field is the name of the file in the \\webmain\public\php\formmail\dbconfig folder, but without the .php extension. Note that this can only be accomplished by the webteam.
In order for the custom form to send the information to a database, you must include the following line of code in the HTML:
<input name="db_config" type="hidden" value="dbfile" />
where 'dbfile' is the name of the database config file (do not enter the .php extenstion)
Sending the form as an email:
To send the results of the form as an email, enter the following line of code near the top of the source code:
<input name="email_recipient" type="hidden" value="JDOE@cornellcollege.edu" />
<input name="email_from" type="hidden" value="firstname.lastname@example.org" />
<input name="email_subject" type="hidden" value="TITLE" /> <br />
where 'JDOE@cornellcollege.edu' is the email address that the form will be sent to.
where 'TITLE' is the subject of the email.
Requiring a log-in:
Enter the following code near the top of the source code to require a Cornell email to view the page/send the form
<input name="email_login" type="hidden" value="Yes"/>
select the outputs button at the top
under the first available block, browse _internal/2011/blocks/require_login and apply the block to require a log in.