WordPress.org

Ready to get started?Download WordPress

Forums

Grunion Contact Form
Change text of submit button (10 posts)

  1. Till Krüss
    Member
    Posted 2 years ago #

    Hello,

    I'd love to be able to change the text (value) of the submit button. Either via filter, or even via admin-ui... or is this already possible?

    Thanks,
    Till

    http://wordpress.org/extend/plugins/grunion-contact-form/

  2. rjleaman
    Member
    Posted 2 years ago #

    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.

  3. maorb
    Member
    Posted 2 years ago #

    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.

  4. Till Krüss
    Member
    Posted 2 years ago #

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

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

  5. snailofsatan
    Member
    Posted 2 years ago #

    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

  6. Till Krüss
    Member
    Posted 2 years ago #

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

  7. snailofsatan
    Member
    Posted 2 years ago #

    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.

  8. Till Krüss
    Member
    Posted 2 years ago #

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

  9. snailofsatan
    Member
    Posted 2 years ago #

    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!

  10. snailofsatan
    Member
    Posted 2 years ago #

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

    thanks in advance :)
    Kev.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic