PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Form button text ignored

  1. caroig
    Member

    I'm using 1.6.2 on a site in Spanish - I've added in the text 'Enviar' in the Advanced, Form Button field but the text 'Submit' is still being displayed for all forms on the site.

    What am I missing?

    Thanks,

    Posted 12 years ago on Thursday March 15, 2012 | Permalink
  2. Got a link to your form?

    Posted 12 years ago on Thursday March 15, 2012 | Permalink
  3. caroig
    Member

    Hi Rob,
    Can I send you user credentials to access the site? I have it diverting to a login screen at the moment.

    Thanks

    Posted 12 years ago on Thursday March 15, 2012 | Permalink
  4. Sure thing, you can send them to rob@rocketgenius.com

    Posted 12 years ago on Thursday March 15, 2012 | Permalink
  5. Is your form using an actual button control, or is your theme replacing the default button with an image. Without seeing it, I'd bet that it's an image you're seeing and not the actual button.

    Posted 12 years ago on Thursday March 15, 2012 | Permalink
  6. caroig
    Member

    It is using a real button - I am using rootstheme with boostrap, it could be introducing something strange on the form.

    Posted 12 years ago on Thursday March 15, 2012 | Permalink
  7. Okay, if you've sent your login info to Rob he'll be able to help you. If it's not replacing the button with an image somewhere, then it could be some kind of theme/script conflict thats preventing the change. Are you sure that you're not seeing a cached version of the form?

    Posted 12 years ago on Thursday March 15, 2012 | Permalink
  8. caroig
    Member

    Thanks for the help Rob - yes my submit button is being 'hijacked' by a cleanup routine in the roots theme.

    function roots_gform_submit_button($button, $form) {
    return "<button class='btn btn-primary' id='gform_submit_button_{$form["id"]}'><span>Submit</span></button>";
    }
    add_filter('gform_submit_button', 'roots_gform_submit_button', 10, 2);

    This is pretty much inline with the GF documentation for the gform_submit_button filter. How can I modify the filter to use the form Button text entered in the advanced form settings?

    Posted 12 years ago on Saturday March 17, 2012 | Permalink
  9. Can't you just place the Enviar text in place of the Submit text in that function?

    function roots_gform_submit_button($button, $form) {
    return "<button class='btn btn-primary' id='gform_submit_button_{$form["id"]}'><span>Enviar</span></button>";
    }
    add_filter('gform_submit_button', 'roots_gform_submit_button', 10, 2);
    Posted 12 years ago on Saturday March 17, 2012 | Permalink
  10. caroig
    Member

    Yes, I have done for this project, although I do have a couple of forms on the site where I'd prefer not to have the same text (so Form a 'Enviar', form b 'Contactar')

    Posted 12 years ago on Saturday March 17, 2012 | Permalink
  11. How can I use the function but without changing the button text I set on the backend ?

    Posted 12 years ago on Monday March 26, 2012 | Permalink