Title: Button submit with name?
Last modified: November 23, 2017

---

# Button submit with name?

 *  Resolved [Kreeger](https://wordpress.org/support/users/kreeger/)
 * (@kreeger)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/button-submit-with-name/)
 * Hi,
 * Why is it not possible to add a name on submit button?
 * I have 2 submit buttons on my form (yes 2 but they do different things).
 * How can I add the name?
 * Thanks you
    -  This topic was modified 8 years, 6 months ago by [Kreeger](https://wordpress.org/support/users/kreeger/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/button-submit-with-name/#post-9717010)
 * Why not? Just add it if you like.
 *  Thread Starter [Kreeger](https://wordpress.org/support/users/kreeger/)
 * (@kreeger)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/button-submit-with-name/#post-9717482)
 * Hi Takayuki Miyoshi,
 * This does not work:
 * `[submit myname "My label"]`
 * will give
 * `<input value="My label" class="wpcf7-form-control wpcf7-submit" type="submit"
   >`
 * The name does not appear as attribute of the submit…
 * Am I wrong?
    -  This reply was modified 8 years, 6 months ago by [Kreeger](https://wordpress.org/support/users/kreeger/).
    -  This reply was modified 8 years, 6 months ago by [Kreeger](https://wordpress.org/support/users/kreeger/).
 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/button-submit-with-name/#post-9717664)
 * Not a form-tag, put a [button element](https://www.w3.org/TR/html5/forms.html#the-button-element)
   directly.
 *  Thread Starter [Kreeger](https://wordpress.org/support/users/kreeger/)
 * (@kreeger)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/button-submit-with-name/#post-9717712)
 * Okay… Thanks. Not very intuitive but it is ok for me
 *  Thread Starter [Kreeger](https://wordpress.org/support/users/kreeger/)
 * (@kreeger)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/button-submit-with-name/#post-9719016)
 * Hi again,
 * I have just tried, but I still do not get the value of the <input type=”submit”
   name=”test” value=”myvalue”> in $_POST.
 *     ```
       add_action('wpcf7_before_send_mail', '_wpcf7_before_send_mail_data', 5);
   
       function _wpcf7_before_send_mail_data($cf7) {
   
                   var_dump($_POST); // I get an array of all my fields but not of the submit. Here I need to get "myvalue"...
   
       }
       ```
   
 * 🙁
    -  This reply was modified 8 years, 6 months ago by [Kreeger](https://wordpress.org/support/users/kreeger/).

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Button submit with name?’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Kreeger](https://wordpress.org/support/users/kreeger/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/button-submit-with-name/#post-9719016)
 * Status: resolved