Support » Plugin: Contact Form 7 Signature Addon » Clear Button

  • Resolved megboggs

    (@megboggs)


    This might be very basic, but I’m not sure how to accomplish it!
    I would like to change the text of the button that clears the signature field from “Clear” to “Clear Signature.”

    I’d like to do this so that there is no confusion with someone thinking that by clicking the “Clear” button they would be clearing the entire form.

    https://wordpress.org/plugins/contact-form-7-signature-addon/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author tameroski

    (@tameroski)

    Hi

    Well, there’s a couple of solution for that, but they all need a little technical knowledge :

    1/ Using WordPress localization system
    Localize the “Clear” string in the desired languages in your own .po files and put it in wp-content/languages/plugins/. My plugin’s text domain is “wpcf7-signature”.
    You might also be using a plugin to do so, like CodeStyling Localization.

    2/ Changing it through Javascript
    In your theme’s javascript file, you should be able to change it easily. So using jQuery, you might be ending with something like that :

    $(".wpcf7-form-control-clear-wrap input").val("Clear signature");

    And if you don’t know what i’m talking about, i’ll take some more time to go deeper in my explanations later in the week.

    I’m on a multi-site WordPress set-up where I don’t have access to editing any theme files. However, I am using a theme that has a place for me to enter custom Javascript. So, it sounds like option 2 might be a winner. If you can explain that option in greater detail that would be helpful. Thanks!

    Plugin Author tameroski

    (@tameroski)

    Almost every theme now is using jQuery, so i think that the little piece of code i wrote for option 2 should work as is. Did you try it in your custom javascript box ?

    If so and unfortunately didn’t work, can i have access to your site somewhere so i can have a look ?

    Plugin Author tameroski

    (@tameroski)

    Another simple solution is to “translate” the “clear” label into “clear signature” using localization.

    If you don’t have access to the server files, install a plugin like Loco Translate, and add translation for my plugin in your language. Select the “Clear” string and add the desired translation. Save the translation file and that’s it.

    Note that you’ll also need to update my plugin to the latest 2.6.8 (released today) for this to work, because i just discovered i was not loading translation files correctly ^^

    Hope this helps.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Clear Button’ is closed to new replies.