WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Grunion Contact Form] Change text of submit button

[Plugin: Grunion Contact Form] Change text of submit button

Viewing 9 replies - 1 through 9 (of 9 total)
  • In your Admin, go to Plugins > Editor and select Grunion Contact Form from dropdown in upper right. Look for text “Submit »” in the plugin files and change it to what you’d prefer the button to say.

    maorb
    Participant

    @maorb

    Chaning the text in the plugin’s soucre code is a bad practice, since upon plugin’s version update, this change will no longer be there.

    Till Krüss
    Participant

    @tillkruess

    Exactly, I’m looking for a proper update-proof solution ; )

    http://plugins.trac.wordpress.org/ticket/1354

    snailofsatan
    Member

    @snailofsatan

    sorry for the ignorance,
    (I’m a newbie)

    I’ve searched the docs and can’t figure out what to put in my functions.php file after making the change to grunion-contact-form.php

    I’ve tried this:-

    define( 'contact_form_submitbutton', apply_filters( 'contact_form_submitbutton', 'Send' ) );

    and this:-

    apply_filters('contact_form_submitbutton', 'Send');

    and also with this:-

    remove_filter( 'contact_form_submitbutton', 'contact_form_submitbutton');

    would you be able to advise on what to use if possible please?

    Thanks in advance 🙂
    Kev

    Till Krüss
    Participant

    @tillkruess

    It’s currently not possible not change the submit button text without editing directly /plugins/grunion-contact-form/grunion-contact-form.php file.

    snailofsatan
    Member

    @snailofsatan

    hi, thanks, I’ve changed the php file as per the instructions here:-

    http://plugins.trac.wordpress.org/ticket/1354

    but not sure what to do next?

    thanks in advance 🙂
    Kev.

    Till Krüss
    Participant

    @tillkruess

    Add your filter: add_filter('contact_form_submitbutton', function($str) { return 'NEW SUBMIT TEXT'; });

    snailofsatan
    Member

    @snailofsatan

    thanks it works, I wouldn’t have figured that out!

    the only other change was to choose PHP=>DEV in my 1and1 hosting control panel which changed the PHP version from 5.2.17 to 6

    🙂
    thanks again!

    snailofsatan
    Member

    @snailofsatan

    sorry to be a pain, for pre PHP5.3 users how can we adapt this add_filter?

    thanks in advance 🙂
    Kev.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Grunion Contact Form] Change text of submit button’ is closed to new replies.