name : textpx.php
<?php
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
 
jimport('joomla.form.formfield');
 
class JFormFieldtextpx extends JFormField {
 
        protected $type = 'textpx';
 
        // getLabel() left out

  //       public function getLabel() {
		//      return '<span style="text-decoration: underline;">' . parent::getLabel() . '</span>';
		// }

        protected $groupClass = 'hello';
 
        public function getInput() {

        	$class = !empty($this->class) ? ' class="' . $this->class . '"' : '';



            return 	'<div class="input-append">'.
					'<input class="input-medium" type="text" name="' . $this->name . '" id="' . $this->id . '"' . ' value="'
					. htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '"/>'.
					'<span class="add-on">px</span>'.
					'</div>';
        }

}

© 2025 Cubjrnet7