Contact Form
An organization-wide contact form is the most essential web form for any website. It's all fine and good to have a staff page with everyone's email listed there, but we know that spam can become a problem. An easy alternative is to create a contact form which allows the site visitor to select which person they wish to contact.
Ingredients
- String Field for email
- Selection Field for choosing the person to contact
- Textarea field
- Mailer Adapter
- Thank You Adapter
Steps
Create a Form Folder - PloneFormGen should give you an Email, Subject, and Comments field by default.
Create a Selection Field for the choices of people to contact. Each person's email should be a single line in the Options box. You can use the value|label method to hide the actual email address and only show a list of names instead. It's up to you if you like radio buttons or a drop-down menu better.
Rearrange the fields in whatever order makes the most sense. Remember that this can be done via the Contents tab.
Edit the Mailer Adapter. Go to the Overrides tab and notice the Recipient Expression field. You need to paste the following line of code in that field
request/form/short-name-of-selection-field
Where "short-name-of-selection-field" matches the short name of your Selection Field.
Edit the Thank You Adapter to include the message you want the form submitter to see. You can also choose to display the field data or not.
