[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Site 5 * @subpackage Layout 6 * 7 * @copyright (C) 2016 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 extract($displayData); 14 15 /** 16 * Layout variables 17 * ----------------- 18 * @var string $autocomplete Autocomplete attribute for the field. 19 * @var boolean $autofocus Is autofocus enabled? 20 * @var string $class Classes for the input. 21 * @var string $description Description of the field. 22 * @var boolean $disabled Is this field disabled? 23 * @var string $group Group the field belongs to. <fields> section in form XML. 24 * @var boolean $hidden Is this field hidden in the form? 25 * @var string $hint Placeholder for the field. 26 * @var string $id DOM id of the field. 27 * @var string $label Label of the field. 28 * @var string $labelclass Classes to apply to the label. 29 * @var boolean $multiple Does this field support multiple values? 30 * @var string $name Name of the input field. 31 * @var string $onchange Onchange attribute for the field. 32 * @var string $onclick Onclick attribute for the field. 33 * @var string $pattern Pattern (Reg Ex) of value of the form field. 34 * @var boolean $readonly Is this field read only? 35 * @var boolean $repeat Allows extensions to duplicate elements. 36 * @var boolean $required Is this field required? 37 * @var boolean $spellcheck Spellcheck state for the form field. 38 * @var string $validate Validation rules to apply. 39 * @var string $value Value attribute of the field. 40 * @var array $checkedOptions Options that will be set as checked. 41 * @var boolean $hasValue Has this field a value assigned? 42 * @var array $options Options available for this field. 43 * @var array $inputType Options available for this field. 44 * @var string $accept File types that are accepted. 45 * @var string $dataAttribute Miscellaneous data attributes preprocessed for HTML output 46 * @var array $dataAttributes Miscellaneous data attribute for eg, data-*. 47 */ 48 49 $attributes = array( 50 !empty($class) ? 'class="form-control ' . $class . '"' : 'class="form-control"', 51 !empty($description) ? 'aria-describedby="' . ($id ?: $name) . '-desc"' : '', 52 $disabled ? 'disabled' : '', 53 $readonly ? 'readonly' : '', 54 strlen($hint) ? 'placeholder="' . htmlspecialchars($hint, ENT_COMPAT, 'UTF-8') . '"' : '', 55 !empty($onchange) ? 'onchange="' . $onchange . '"' : '', 56 isset($max) ? 'max="' . $max . '"' : '', 57 !empty($step) ? 'step="' . $step . '"' : '', 58 isset($min) ? 'min="' . $min . '"' : '', 59 $required ? 'required' : '', 60 !empty($autocomplete) ? 'autocomplete="' . $autocomplete . '"' : '', 61 $autofocus ? 'autofocus' : '', 62 $dataAttribute, 63 ); 64 65 if (is_numeric($value)) { 66 $value = (float) $value; 67 } else { 68 $value = ''; 69 $value = ($required && isset($min)) ? $min : $value; 70 } 71 ?> 72 <input 73 type="number" 74 inputmode="numeric" 75 name="<?php echo $name; ?>" 76 id="<?php echo $id; ?>" 77 value="<?php echo htmlspecialchars($value, ENT_COMPAT, 'UTF-8'); ?>" 78 <?php echo implode(' ', $attributes); ?>>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |