[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/components/com_contact/tmpl/contact/ -> default_form.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Site
   5   * @subpackage  com_contact
   6   *
   7   * @copyright   (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
   8   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   9   */
  10  
  11  defined('_JEXEC') or die;
  12  
  13  use Joomla\CMS\HTML\HTMLHelper;
  14  use Joomla\CMS\Language\Text;
  15  use Joomla\CMS\Router\Route;
  16  
  17  HTMLHelper::_('behavior.keepalive');
  18  HTMLHelper::_('behavior.formvalidator');
  19  
  20  ?>
  21  <div class="com-contact__form contact-form">
  22      <form id="contact-form" action="<?php echo Route::_('index.php'); ?>" method="post" class="form-validate form-horizontal well">
  23          <?php foreach ($this->form->getFieldsets() as $fieldset) : ?>
  24              <?php if ($fieldset->name === 'captcha' && !$this->captchaEnabled) : ?>
  25                  <?php continue; ?>
  26              <?php endif; ?>
  27              <?php $fields = $this->form->getFieldset($fieldset->name); ?>
  28              <?php if (count($fields)) : ?>
  29                  <fieldset class="m-0">
  30                      <?php if (isset($fieldset->label) && ($legend = trim(Text::_($fieldset->label))) !== '') : ?>
  31                          <legend><?php echo $legend; ?></legend>
  32                      <?php endif; ?>
  33                      <?php foreach ($fields as $field) : ?>
  34                          <?php echo $field->renderField(); ?>
  35                      <?php endforeach; ?>
  36                  </fieldset>
  37              <?php endif; ?>
  38          <?php endforeach; ?>
  39          <div class="control-group">
  40              <div class="controls">
  41                  <button class="btn btn-primary validate" type="submit"><?php echo Text::_('COM_CONTACT_CONTACT_SEND'); ?></button>
  42                  <input type="hidden" name="option" value="com_contact">
  43                  <input type="hidden" name="task" value="contact.submit">
  44                  <input type="hidden" name="return" value="<?php echo $this->return_page; ?>">
  45                  <input type="hidden" name="id" value="<?php echo $this->item->slug; ?>">
  46                  <?php echo HTMLHelper::_('form.token'); ?>
  47              </div>
  48          </div>
  49      </form>
  50  </div>


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer