Answers.Body: <p>You can use the Word Replacement function for this! Here’s a nice tutorial: <a href="https://www.cividesk.com/blog/did-you-know-any-word-or-phrase-civicrm-can-be-replaced-another-one" rel="noreferrer">https://www.cividesk.com/blog/did-you-know-any-word-or-phrase-civicrm-can-be-replaced-another-one</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-16T23:01:38.757Z
Answers.Text: The issue with that is "Continue" is used in multiple places inside CiviCRM. So it would change it everywhere, not just the confirmation page.
Answers.UserDisplayName: Jenni Simonis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-19T20:21:15.423Z
Answers.Text: Yeah... right; Ok - I've got another idea; will post it.
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-16T22:56:45.927Z
Answers.LastActivityDate: 2017-11-16T22:56:45.927Z
Answers.UserDisplayName: KarinG - Semper IT
Answers.Body: <p>If you're using WordPress, you can write a quick plugin to do this. The following code amends the submit button's text value on the Registration Confirmation form:</p>
  
  <pre><code>add_action( 'civicrm_buildForm', 'my_prefix_alter_form_button', 10, 2 );
  
  /**
   * Amend the Registration Confirmation form submit button value.
   *
   * @param string $formName The name of the form.
   * @param CRM_Core_Form $form The form object.
   */
  function my_prefix_alter_form_button( $formName, &amp;$form ) {
  
      // bail if not the form we want
      if ( $formName != 'CRM_Event_Form_Registration_Confirm' ) return;
  
      // drill down until we find the submit element and change its value
      foreach( $form-&gt;_elements as $element ) {
          if ( isset( $element-&gt;_name ) &amp;&amp; $element-&gt;_name == 'buttons' ) {
              foreach( $element-&gt;_elements as $item ) {
                  if ( isset( $item-&gt;_type ) &amp;&amp; $item-&gt;_type == 'submit' ) {
                      if ( isset( $item-&gt;_attributes ) &amp;&amp; $item-&gt;_attributes['name'] == '_qf_Confirm_next' ) {
                          $item-&gt;_attributes['value'] = __( 'Continue to pay via Paypal', 'my-plugin-slug' );
                      }
                  }
              }
          }
      }
  
  }
  </code></pre>
  
  <p>You can adapt this methodology to work with Drupal too. You'd have to create a module with an appropriately-named function, but the code inside the function should be identical. Here's the code to add to a Drupal module:</p>
  
  <pre><code>/**
   * Amend the button value.
   *
   * @param string $formName The name of the form.
   * @param CRM_Core_Form $form The form object.
   */
  function my_module_prefix_civicrm_buildForm( $formName, &amp;$form ) {
  
      // bail if not the form we want
      if ( $formName != 'CRM_Event_Form_Registration_Confirm' ) return;
  
      // drill down until we find the submit element and change its value
      foreach( $form-&gt;_elements as $element ) {
          if ( isset( $element-&gt;_name ) &amp;&amp; $element-&gt;_name == 'buttons' ) {
              foreach( $element-&gt;_elements as $item ) {
                  if ( isset( $item-&gt;_type ) &amp;&amp; $item-&gt;_type == 'submit' ) {
                      if ( isset( $item-&gt;_attributes ) &amp;&amp; $item-&gt;_attributes['name'] == '_qf_Confirm_next' ) {
                          $item-&gt;_attributes['value'] = t( 'Continue to pay via Paypal' );
                      }
                  }
              }
          }
      }
  
  }
  </code></pre>
  
  <p>You need to substitute <code>my_module_prefix</code> with the actual prefix of your module so that the function receives callbacks from the hook.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-20T19:39:32.240Z
Answers.Text: Nice - yes that works [Wordpress or Drupal] - and best of all - it's not a CRM / PHP override;
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-21T01:38:24.553Z
Answers.Text: I'm in Drupal. What do I need to do to create a module? I haven't done that before.
Answers.UserDisplayName: Jenni Simonis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-21T01:44:02.473Z
Answers.Text: I've got the module folder, .info file, and a fairly empty .module file created.
Answers.UserDisplayName: Jenni Simonis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-21T09:29:18.047Z
Answers.Text: @JenniSimonis I have updated the answer with the code for your Drupal module. It should go in your .module file.
Answers.UserDisplayName: Christian Wach
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-21T22:42:35.443Z
Answers.Text: Thanks. It might be a few days before I can test it all out, as I'm working on another issue with CiviEvent, plus Thanksgiving.
Answers.UserDisplayName: Jenni Simonis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-20T19:23:26.823Z
Answers.LastActivityDate: 2017-11-21T09:28:43.600Z
Answers.LastEditDate: 2017-11-21T09:28:43.600Z
Answers.UserDisplayName: Christian Wach
Answers.Body: <p>Try changing the value with Javascript - as in:</p>
  
  <pre><code>document.getElementById("_qf_Confirm_next-top").value="Continue to pay via PayPal";
  </code></pre>
  
  <p>and something similar (but not the id is different) for the button at the bottom of the page.</p>
  
  <p>Adding JavaScript - since this is a front-facing public Event registration page - I like adding it to the theme js.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-19T20:14:57.163Z
Answers.LastActivityDate: 2017-11-19T20:25:01.830Z
Answers.LastEditDate: 2017-11-19T20:25:01.830Z
Answers.UserDisplayName: KarinG - Semper IT
Answers.Body: <p>This might not be a complete solution, but the text for the button is coded in
  <code>[civicrm.root]/CRM/Event/Form/Registration/Confirm.php</code> at line 305 in version 4.7.22 (and 4.7.27)</p>
  
  <pre><code>$contribButton = ts('Continue to pay via Paypal');
  $this-&gt;addButtons(array(
      array(
        'type' =&gt; 'back',
        'name' =&gt; ts('Go Back'),
      ),
      array(
        'type' =&gt; 'next',
        'name' =&gt; $contribButton,
        'isDefault' =&gt; TRUE,
        'js' =&gt; array('onclick' =&gt; "return submitOnce(this,'" . $this-&gt;_name . "','" . ts('Processing') . "');"),
      ),
    )
  );
  </code></pre>
  
  <p>Replace the first line with</p>
  
  <pre><code>if ($this-&gt;_allowWaitlist) {
      $contribButton = ts('Continue');
  } else {
      $contribButton = ts('Continue to pay via Paypal');
  }
  </code></pre>
  
  <p>The if statement is needed because the same code is used for confirmation of addition to the wait list.</p>
  
  <p>Caveat is that I haven't checked that there are no effects elsewhere (unlikely as its in something called confirm.php) and that I'm not really a coder so would welcome confirmation that this is right (but it seems to work). But I'm quite proud of getting this far.</p>
  
  <p>If I get the bounty then I can put one on one of my problems!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-19T18:15:35.257Z
Answers.Text: Generaly overriding php is not recommended - it can easily break your site on upgrades
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-19T23:26:27.823Z
Answers.Text: Thanks. This is exactly the kind of thing I was looking for. The recommendation for making changes is to take the template files, which this is one, and copy them into a custom template folder, edit them, and use those.
  
  I get that generally changing PHP is not recommended, but that is not true when it comes to the template files. Hence why there's a whole system set up for using custom template files.
  
  Apparently our copy of confirm.php was older, as it didn't have any of this. I'll have to figure out what changes we made and replicate them.
Answers.UserDisplayName: Jenni Simonis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-20T16:05:18.043Z
Answers.Text: I strongly advise against overriding confirm.php - that’s in /CRM;
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-20T16:07:30.133Z
Answers.Text: Just to clarify: confirm.php is not a template file
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-21T01:37:19.220Z
Answers.Text: Ah, I was looking at my Confirm.tpl file, not Confirm.php
Answers.UserDisplayName: Jenni Simonis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-19T13:15:56.473Z
Answers.LastActivityDate: 2017-11-19T13:15:56.473Z
Answers.UserDisplayName: Mick Kahn
Body: <p>How do I go about changing out the text on the confirmation page for events so that it says something different? Right now it says "Continue" and we'd like it to say something like "Continue to pay via Paypal". I've been digging through the template files and can't find where I would change that.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-11-18T00:54:43.860Z
Comments.Text: Anyone have an idea besides word replacement? Because we can't just replace "Continue" in all of the places where it says that word.
Comments.UserDisplayName: Jenni Simonis
Tags: <civievent>
Title: Change text for "Continue" button
ThreadText: # Change text for "Continue" button
  
  (Asked by: username_0 on 2017-11-16)
  
  How do I go about changing out the text on the confirmation page for events so that it says something different? Right now it says "Continue" and we'd like it to say something like "Continue to pay via Paypal". I've been digging through the template files and can't find where I would change that.
  
  **Tags:** civievent
  
  > **Comments:**
  > **username_0**: Anyone have an idea besides word replacement? Because we can't just replace "Continue" in all of the places where it says that word.  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_1 on 2017-11-16. Score: 5
  
  You can use the Word Replacement function for this! Here’s a nice tutorial: <https://www.cividesk.com/blog/did-you-know-any-word-or-phrase-civicrm-can-be-replaced-another-one>
  
  > **Comments:**
  > **username_0**: The issue with that is "Continue" is used in multiple places inside CiviCRM. So it would change it everywhere, not just the confirmation page.  
  > **username_1**: Yeah... right; Ok - I've got another idea; will post it.  
  
  ---
  
  ### Answer by username_2 on 2017-11-20. Score: 5
  
  If you're using WordPress, you can write a quick plugin to do this. The following code amends the submit button's text value on the Registration Confirmation form:
  add_action( 'civicrm_buildForm', 'my_prefix_alter_form_button', 10, 2 );
  
  /**
   * Amend the Registration Confirmation form submit button value.
   *
   * @param string $formName The name of the form.
   * @param CRM_Core_Form $form The form object.
   */
  function my_prefix_alter_form_button( $formName, &$form ) {
  
      // bail if not the form we want
      if ( $formName != 'CRM_Event_Form_Registration_Confirm' ) return;
  
      // drill down until we find the submit element and change its value
      foreach( $form->_elements as $element ) {
          if ( isset( $element->_name ) && $element->_name == 'buttons' ) {
              foreach( $element->_elements as $item ) {
                  if ( isset( $item->_type ) && $item->_type == 'submit' ) {
                      if ( isset( $item->_attributes ) && $item->_attributes['name'] == '_qf_Confirm_next' ) {
                          $item->_attributes['value'] = __( 'Continue to pay via Paypal', 'my-plugin-slug' );
                      }
                  }
              }
          }
      }
  
  }
  
  You can adapt this methodology to work with Drupal too. You'd have to create a module with an appropriately-named function, but the code inside the function should be identical. Here's the code to add to a Drupal module:
  /**
   * Amend the button value.
   *
   * @param string $formName The name of the form.
   * @param CRM_Core_Form $form The form object.
   */
  function my_module_prefix_civicrm_buildForm( $formName, &$form ) {
  
      // bail if not the form we want
      if ( $formName != 'CRM_Event_Form_Registration_Confirm' ) return;
  
      // drill down until we find the submit element and change its value
      foreach( $form->_elements as $element ) {
          if ( isset( $element->_name ) && $element->_name == 'buttons' ) {
              foreach( $element->_elements as $item ) {
                  if ( isset( $item->_type ) && $item->_type == 'submit' ) {
                      if ( isset( $item->_attributes ) && $item->_attributes['name'] == '_qf_Confirm_next' ) {
                          $item->_attributes['value'] = t( 'Continue to pay via Paypal' );
                      }
                  }
              }
          }
      }
  
  }
  
  You need to substitute my_module_prefix with the actual prefix of your module so that the function receives callbacks from the hook.
  
  > **Comments:**
  > **username_1**: Nice - yes that works [Wordpress or Drupal] - and best of all - it's not a CRM / PHP override;  
  > **username_0**: I'm in Drupal. What do I need to do to create a module? I haven't done that before.  
  > **username_0**: I've got the module folder, .info file, and a fairly empty .module file created.  
  > **username_2**: @JenniSimonis I have updated the answer with the code for your Drupal module. It should go in your .module file.  
  > **username_0**: Thanks. It might be a few days before I can test it all out, as I'm working on another issue with CiviEvent, plus Thanksgiving.  
  
  ---
  
  ### Answer by username_1 on 2017-11-19. Score: 3
  
  Try changing the value with Javascript - as in:
  document.getElementById("_qf_Confirm_next-top").value="Continue to pay via PayPal";
  
  and something similar (but not the id is different) for the button at the bottom of the page.
  Adding JavaScript - since this is a front-facing public Event registration page - I like adding it to the theme js.
  
  
  ---
  
  ### Answer by username_3 on 2017-11-19. Score: 1
  
  This might not be a complete solution, but the text for the button is coded in
  [civicrm.root]/CRM/Event/Form/Registration/Confirm.php at line 305 in version 4.7.22 (and 4.7.27)
  $contribButton = ts('Continue to pay via Paypal');
  $this->addButtons(array(
      array(
        'type' => 'back',
        'name' => ts('Go Back'),
      ),
      array(
        'type' => 'next',
        'name' => $contribButton,
        'isDefault' => TRUE,
        'js' => array('onclick' => "return submitOnce(this,'" . $this->_name . "','" . ts('Processing') . "');"),
      ),
    )
  );
  
  Replace the first line with
  if ($this->_allowWaitlist) {
      $contribButton = ts('Continue');
  } else {
      $contribButton = ts('Continue to pay via Paypal');
  }
  
  The if statement is needed because the same code is used for confirmation of addition to the wait list.
  Caveat is that I haven't checked that there are no effects elsewhere (unlikely as its in something called confirm.php) and that I'm not really a coder so would welcome confirmation that this is right (but it seems to work). But I'm quite proud of getting this far.
  If I get the bounty then I can put one on one of my problems!
  
  > **Comments:**
  > **username_1**: Generaly overriding php is not recommended - it can easily break your site on upgrades  
  > **username_0**: Thanks. This is exactly the kind of thing I was looking for. The recommendation for making changes is to take the template files, which this is one, and copy them into a custom template folder, edit them, and use those.  I get that generally changing PHP is not recommended, but that is not true when it comes to the template files. Hence why there's a whole system set up for using custom template files.  Apparently our copy of confirm.php was older, as it didn't have any of this. I'll have to figure out what changes we made and replicate them.  
  > **username_1**: I strongly advise against overriding confirm.php - that’s in /CRM;  
  > **username_1**: Just to clarify: confirm.php is not a template file  
  > **username_0**: Ah, I was looking at my Confirm.tpl file, not Confirm.php  
  
  ---
  
  