2
 <li class="fields">
        <div class="field">
            <label><?php echo $this->__('Annual Usage') ?></label>
            <div class="input-box">
            <input type='text' value="<?php echo $this->getValue('annual') ?>"
            name='customer[usage]' id='customer:usage' class="input-text"/>
            </div>
        </div>
    </li>

I want to add two more form fields and append them to the submit with Javascript. How do I tie into the form submission?

closed as unclear what you're asking by Marius Jul 29 '15 at 8:45

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • did you ever get this sorted? – David Manners Feb 21 '15 at 13:25
1

Once you add additional field with in the <form> .. </form> tag they will automatically get appended to the form during submit (assuming that you are not manually add the form field to an ajax post/get).

But you may have to modify your php script to process that field (i.e save the field to the db)

  • Is there a way to hijack the form submission with javascript? I've inherited a site with a plugin that uses ioncube to mask some parts of the code. The customer relies on the plugin for lead generation so I dont want to strip it out just do some sort of onclick to piggyback on the submit and append it to the submission. It goes to a transactional email template. – Matthew McLennan Nov 17 '14 at 2:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.