Custom forms in Magento

controller, forms, magento, php

Solution

If any one is interested, I solved this by building my own module which was heavily based on the `Magento_Contacts` module.

Here are some links that helped me figure things out.

http://www.magentocommerce.com/wiki/custom_module_with_custom_database_table

http://inchoo.net/ecommerce/magento/magento-custom-emails/

Problem

Can anyone provide a dummy guide \ code snippets on how to create a front end form in Magento that posts data to a controller action. Im trying to write a variant of the contact us from. (I know its easy to modify the contact us form, as outlined here). I'm trying to also create a feedback form with additional fields. Given this basic form: ``` <form action="<?php echo $this->getFormAction(); ?>" id="feedbackForm" method="post"> <div class="input-box"> <label for="name"><?php echo Mage::helper('contacts')->__('Name') ?> <span class="required">*</span></label><br /> <input name="name" id="name" title="<?php echo Mage::helper('contacts')->__('Name') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserName()) ?>" class="required-entry input-text" type="text" /> </div> <div class="button-set"> <p class="required"><?php echo Mage::helper('contacts')->__('* Required Fields') ?></p> <button class="form-button" type="submit"><span><?php echo Mage::helper('contacts')->__('Submit') ?></span></button> </div> </form> ``` What are the basic step I need to take to get inputted name to a controller action for processing?

Original source