Grunion Contact Form
Feature Request - Submit Button Text (3 posts)

  1. Trionic Labs
    Posted 4 years ago #

    I'm using the jetpack version and I was forced to implement this on my copy (bad I know but what can you do?)

    Anyways, here is my suggestion:

    I need different submit button text for different forms, so the following changes add a new argument to the [contact-form] shortcode:

    [contact-form] would have the submit button do the default thing.
    [contact-form submit='Send Bug Report'] => Use alternative submit button text.

    - - -

    To make this change, it is really pretty easy. Just make the following 4 minor changes:

    At around line 220, beneath:

    $default_to = get_option( 'admin_email' );
    $default_subject = "[" . get_option( 'blogname' ) . "]";

    Add the following line:

    $default_submit = __( "Submit »", 'jetpack' );

    - - -

    At around line 233, beneath:

    'subject' => $default_subject,
    'show_subject' => 'no', // only used in back-compat mode

    Add the following line:

    'submit' => $default_submit, // alternate submit button text

    - - -

    At around line 248, beneath:

    $grunion_form->subject = $subject;
    $grunion_form->show_subject = $show_subject;

    Add the following line:

    $grunion_form->submit_text = $submit;

    - - -

    Finally, change the following line:

    $r .= "\t\t<input type='submit' value='" . __( "Submit »", 'jetpack' ) . "' class='pushbutton-wide'/>\n";


    $r .= "\t\t<input type='submit' value='" . $grunion_form->submit_text . "' class='pushbutton-wide'/>\n";


  2. rpb1001
    Posted 3 years ago #

    Nice plugin and easy to use.
    However, I would also be interested to have control over the "Submit" button text so that the form can be used for other language websites.
    I think the code has changed since the suggestion above.
    Any chance of adding that in the code?
    Many thanks.

  3. adrianovarlotta
    Posted 3 years ago #

    Thank you bro,
    but i changed and didnt change nothing :( i dont know why....

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Grunion Contact Form
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.