Custom Wording on Jetpack Contact Form Submit Buttons

| 8 Comments

Let me be honest, I have mixed opinions on the Jetpack plugin for WordPress. It contains a lot of features that might have been better as independent plugins and it is kind of bloated. However, a lot of the features are very useful and therefore it is hard to ignore the plugin all together. So actually, I use it on most of the sites I make.

The Jetpack Contact Form

One of the features I like, is the ability to easily insert a contact form in any post or page. The only thing that bothers me is the text (the value) on the submit button. It is per default set to “Submit” and there are no clues on how to alter that text. There is an easy way to alter the value, however.

The contact form is inserted in your post with a shortcode which looks like this:

[contact-form subject='Some subject' to='some@email.address'][contact-field label='Name' type='name' required='1'/][contact-field label='Email' type='email' required='1'/][contact-field label='Comment' type='textarea' required='1'/][/contact-form]

So what you need to do, is add the parameter submit_button_text to [contact-form]. Like this:

[contact-form subject='Some subject' to='some@email.address' submit_button_text='Your custom submit text here']

That way, You are able to decide what your buttons are going to say.

Via | Translations: Dansk →

Author: Morten Brunbjerg Bech

Webdesigner, front end udvikler og bibliotekar. Arbejder primært med udvikling og design af Horsens Kommunes Bibliotekers webløsninger og er specialist i semantisk strukturering af webdokumenter samt Adobe Photoshop og Illustrator.

8 Comments

  1. Thanks – I put it before the closing tag and wondered why my form disappeared. After reading you post, I realised it was to replace the opening tag.. makes sense now!

  2. Since you seem to know your way around these forms, I have a question about them for you. For some reason when I use the jetpack forms it fills in my email adress as default. Is there a way to prevent this from happening?

  3. I don’t know where my previous comment went, but in any case. The default name and email values are pulled from the currently logged in user. So the fields will be empty if you are not a logged in user, which is brilliant.

    • Exactly. If you are already logged in, WordPress will use the e-mail address of your profile. If you are logged in to WordPress.com, this also applies.

      Also, if you are using Chrome as your browser of choice, it may fill in forms automatically, based on what you have previously entered in other forms.

  4. This makes my form disappear. Help?

  5. Let me try this again. I tried to post this comment and it disappeared.

    So. This makes my form disappear, too, even when I carefully included all the square brackets and slashes in the code.

    This is the code I’m working with:

    [contact-form to='myemailaddress' subject='mailing list sign-up form'][contact-field label='Name' type='name' required='1'/][contact-field label='Email' type='email' required='1'/][/contact-form]

    Can you please modify it so that the button says “click here” instead of “submit”?

    And, as a bonus question, is there *any* way to change the button color to anything but the default traffic cone orange?

    • That is a bit odd. Your code works just fine on my blog. You do have Jetpack installed, right? Anyway, here goes the code, which makes the button say “click here”.

      [contact-form to='myemailaddress' subject='mailing list sign-up form' submit_button_text='click here'][contact-field label='Name' type='name' required='1'/][contact-field label='Email' type='email' required='1'/][/contact-form]

      The color of the button depends on your theme. You may be able to alter it with CSS.

Leave a Reply