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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Where do I edit "{$form.buttons.html}"?
Pages: [1]

Author Topic: Where do I edit "{$form.buttons.html}"?  (Read 1745 times)

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Where do I edit "{$form.buttons.html}"?
March 10, 2010, 12:08:28 pm
I would like to edit the text that appears in the 'submit' button.  I thought it was in the tpl file, but it turns out the tpl file calls this little function: {$form.buttons.html}.  Where is this and where can I edit it? 

thanks,
Maria

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Where do I edit "{$form.buttons.html}"?
March 10, 2010, 08:53:38 pm
Maria :
You might want to check the corresponding php file for changes in button text.

HTH
-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: Where do I edit "{$form.buttons.html}"?
March 10, 2010, 10:42:02 pm
What is the corresponding file?  That is what I can't figure it out.  Lots of .tpl  files are listed, but if they have the buttons.html code in it, it looks just like the file in question.  I assume there is something somewhere that actually generates the html code specified in "buttons.html" but I can't find that file and am not even sure where to look.

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Where do I edit "{$form.buttons.html}"?
March 10, 2010, 10:43:41 pm
On which form do you want to change the button text?
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: Where do I edit "{$form.buttons.html}"?
March 10, 2010, 10:46:22 pm
it is in CRM/Event/Form/Registration/Register.tpl around line 139.  This is the code:
Code: [Select]
   <div id="crm-submit-buttons">
     {$form.buttons.html}
   </div>

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Where do I edit "{$form.buttons.html}"?
March 10, 2010, 11:30:12 pm
You might want to change the name (Continue >>) to whatever string you want in CRM/Event/Form/Registration/Register.php
 
Code: [Select]
$this->addButtons(array(
                                    array ( 'type'      => 'upload',
                                            'name'      => ts('Continue >>'),
                                            'spacing'   => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
                                            'isDefault' => true,
                                            'js'        => $js ),
                                    )
                              );

HTH
-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Where do I edit "{$form.buttons.html}"?
March 11, 2010, 02:15:19 am
It would really be easier/nicer/more logical to have the array of buttons assigned to the template and let the template do its job of layouting the buttons instead of assigning an html blob.

Kyle, what do you think ?

(stupid question probably, but is it possible to include sub templates within the main and assigning variables ?

eg: {$forms.buttons} contains the array
being able to have something like:

{include "part/buttons.tpl"  buttons=$forms.buttons}

and part/buttons.tpl contains

{foreach button...
...
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: Where do I edit "{$form.buttons.html}"?
March 11, 2010, 09:23:09 am
I agree with Kyle, but in the meantime,

Yoshodha - are you saying I should replace the {$form...blob with the code you gave?  I am not a coder, so could you clarify the exact way to insert into the .tpl, with curly brackets and all?  I did insert it and it simply printed the code on the page.  Right place, but not exactly what I am looking for.

Thanks,
Maria

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Where do I edit "{$form.buttons.html}"?

This forum was archived on 2017-11-26.