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?

1
  • did you ever get this sorted? Feb 21, 2015 at 13:25

1 Answer 1

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)

1
  • 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. Nov 17, 2014 at 2:18

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