External form or hard coded form block?

Hey guys!
I need to include a form in a page type, which has the some basic functionality as the c5 form block: it can send email messages when the form is submitted and the submissions are tracked in the C5 report system. The email messages must have a subject that is different, depending on the page the form was submitted from. I have no clue on how to start implementing such forms. I would be very happy if someone could give me some help on this. Thanks!

A simple hack would be to name the forms differently and then edit the form controller to check for the form name and set up the mail helper accordingly. In the form/controller.php (don't forget to copy it to the root/blocks/ directory first!) at around line 340 you could add something like this:

Hey there!
Thank you for your efforts! Unfortunatelly, this is exactly what I want to bypass, because there are at least 30 pages plus translations in three languages. :/
I started studying the form controller, specifically the action_form_submit (or something like that) method and I noticed, that might be code I need to copy and modify to suit my needs, but I am somewhat overwhelmed by it -- it seems way too much for such an easy task. :(

Unfortunatelly this addon does not suit my needs perfectly. I do not want to create different forms for all the pages (something like 30 pages per language for four langauges). I would like to hard code one form, that would integrate well into C5, that is, the user submissions are tracked just like in the case of the normal form block, plus it sends an email message to the specified email adresses AND to the submitter also. Unfortunatelly I have no idea how to set up a form block manually from code. I don't know if I am clear enough - I am trying to do something similar, when you hard code a navigation into a page with BlockType::getByHandle("autonav")...

Do you need the form to have customizable fields (like the built-in form block does)? Or is it okay if you "hard-code" the fields into the form and not have them modifiable by the people managing the site content?

Attached is a block with some boilerplate code in it that I use for these kinds of blocks. Here's how to set it up:

1. Unzip and move the "custom_contact_form" folder to your site's top-level "blocks" directory (note: this is just a block, *not* a package -- so don't put it in your "packages" directory).

2. Rename the "custom_contact_form" folder as desired (should be the lowercase_and_underscore version of your block's name -- for example, "My Great Form" would get a directory name of "my_great_form").

3. Edit the block's "controller.php" file:
* Change the class name to be a TitleCaseWithNoSpaces version of the block name (otherwise known as CamelCase), followed by "BlockController" -- for example, "My Great Form" would get a class name of "MyGreatFormBlockController".
* Change the block name and description. It is recommended that the name correspond with the directory and class names, but this is not a technical requirement (just avoids confusion).
* Change the table name to "bt" followed by the CamelCase version of the block name -- for example, "My Great Form" would get a table name of "btMyGreatForm".

4. Edit "db.xml" file so the table name matches what you set in "controller.php".

5. Customize the form as needed. The view.php file contains the form html. The action_submit_form() method in controller.php responds to form submissions.

Stumbled upon your solution by luck. Seemed like an easy method to hardcode a custom form. Followed your instructions and had a custom form in seconds.

Unfortunately, nothing happens on submit? =(

Only things I've changed are the block names, as instructed and changed the input fields in view.php. In the Dashboard > Reports > Form Results, the new Custom Form is visible, but the # of submissions stays 0. Guess the form is just being cocky and doesn't wants to cooperate =P