Answers.Body: <p>Most / All forms inherit the form code from:</p>
  
  <p>templates/CRM/Form/default.tpl</p>
  
  <p>I dont think you should modify that. However, the form tag also emits all attributes attached to the form. So your best bet will be to add an attribute to the form object in the buildForm hook for event registration. There is a method call on the form object to add an attribute:</p>
  
  <p>$form->updateAttributes()</p>
  
  <p>lobo</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-15T20:28:15.053Z
Answers.Text: Thank you Lobo, it worked fine with this content in the civicrmHooks.php (posting here if anyone needs it): <?php
  /**
   * Inserts a call to a new browser screen/tab when submit event '1' registration form.
   */
  function joomla_civicrm_buildForm($formName, &$form) {
    if ($formName == 'CRM_Event_Form_Registration_Register') {
      if ($form->_eventId == 1) {
          $form->updateAttributes(array('target' => _blank));
      }
    }
  }
Answers.UserDisplayName: diegov
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-15T15:36:19.113Z
Answers.LastActivityDate: 2015-04-15T15:36:19.113Z
Answers.UserDisplayName: Donald Lobo
Body: <p>I need to add a target attribute to the "form action" tag of an Event Registration form, because I need the Confirmation to open in a new window. </p>
  
  <p>I'm trying to find the TPL file that inserts the "form action" tag, but I couldn't find it already. So, where is it?</p>
  
  <p>Thanks.</p>
  
Tags: <civievent><custom-templates>
Title: Where do I found the "form action" call in TPLs to an Event?
ThreadText: # Where do I found the "form action" call in TPLs to an Event?
  
  (Asked by: username_0 on 2015-04-15)
  
  I need to add a target attribute to the "form action" tag of an Event Registration form, because I need the Confirmation to open in a new window.
  
  I'm trying to find the TPL file that inserts the "form action" tag, but I couldn't find it already. So, where is it?
  
  Thanks.
  
  **Tags:** civievent, custom-templates
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-04-15. Score: 2 | Accepted answer
  
  Most / All forms inherit the form code from:
  
  templates/CRM/Form/default.tpl
  
  I dont think you should modify that. However, the form tag also emits all attributes attached to the form. So your best bet will be to add an attribute to the form object in the buildForm hook for event registration. There is a method call on the form object to add an attribute:
  
  $form->updateAttributes()
  
  lobo
  
  > **Comments:**
  > **username_0**: Thank you Lobo, it worked fine with this content in the civicrmHooks.php (posting here if anyone needs it): <?php /**  * Inserts a call to a new browser screen/tab when submit event '1' registration form.  */ function joomla_civicrm_buildForm($formName, &$form) {   if ($formName == 'CRM_Event_Form_Registration_Register') {     if ($form->_eventId == 1) {         $form->updateAttributes(array('target' => _blank));     }   } }  
  
  ---
  
  