• Resolved Kreeger

    (@kreeger)


    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 7 years, 4 months ago by Kreeger.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Why not? Just add it if you like.

    Thread Starter Kreeger

    (@kreeger)

    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 7 years, 4 months ago by Kreeger.
    • This reply was modified 7 years, 4 months ago by Kreeger.
    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Not a form-tag, put a button element directly.

    Thread Starter Kreeger

    (@kreeger)

    Okay… Thanks. Not very intuitive but it is ok for me

    Thread Starter Kreeger

    (@kreeger)

    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 7 years, 4 months ago by Kreeger.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Button submit with name?’ is closed to new replies.