CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Change the value of "Continue" button
Pages: [1]

Author Topic: Change the value of "Continue" button  (Read 1033 times)

unclejustin

  • I post occasionally
  • **
  • Posts: 38
  • Karma: 2
  • CiviCRM version: 4.3.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5
  • PHP version: 5.3.6
Change the value of "Continue" button
September 02, 2011, 10:37:22 am
In a CiviEvent registration form I just want to change the "Continue >>" button value to "Submit". I started down the _civicrm_buildform hook and I can pull out the values from there, but before I dig any deeper, is there an easier way to do this? Or do I really need to traverse down the the object to extract the value of that property and change it? Please forgive my obvious newness Civi.
-justin

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Change the value of "Continue" button
September 02, 2011, 11:01:51 am

might be a lot easier to change the name via jQuery and adding an extra tpl file. check:

http://civicrm.org/blogs/dave-greenberg/now-its-easier-add-custom-behaviors-templates

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

unclejustin

  • I post occasionally
  • **
  • Posts: 38
  • Karma: 2
  • CiviCRM version: 4.3.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5
  • PHP version: 5.3.6
Re: Change the value of "Continue" button
September 02, 2011, 03:25:03 pm
Thanks Don, this seems like it should work for me just fine except that I can't get that template file to pick up. I've got the jQuery figured out on jsfiddle here http://jsfiddle.net/EkrjW/ that part was easy.

I've set my custom templates directory to "/var/www/.../files/civicrm/templates" then built the template structure out under there as per the link to ".../civicrm/templates/CRM/Event/Form/Registration/Register.extra.tpl"

and added {literal}<script>$('#_qf_Register_upload-bottom').val('Submit');</script>{/literal} to that file.

But it still doesn't pick up. Is there something I can look for maybe in the page source that I can tell if the script is being inserted or not?

Thanks again for you help.
-justin

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Change the value of "Continue" button
September 03, 2011, 12:45:41 am
Quote from: unclejustin on September 02, 2011, 03:25:03 pm

and added {literal}<script>$('#_qf_Register_upload-bottom').val('Submit');</script>{/literal} to that file.

Check if }<script>$('#_qf_Register_upload-bottom').val('Submit' is in the page.

Did you config civi to take into account your custom directory? More often than not, I put or forgot to put "/CRM" at the end (I never know if it's needed or needed NOT to be there).

X+

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Change the value of "Continue" button

This forum was archived on 2017-11-26.