protected function renderControl($type = null, $confirmation = false) { if (!$type) { $type = $this->field->type; } ?> <input type="<?php echo $type; ?> " name="<?php echo ($confirmation ? 'confirm_' : '') . $this->field->name; ?> " class="field-control fld-<?php echo $this->field->type; ?> <?php echo $this->field->css_class; ?> " <?php $this->outputId($confirmation ? 'confirm_' : ''); $this->outputAttributes($this->field->attributes); if ($this->field->getValue($confirmation) != null) { echo ' value="' . $this->field->getValue($confirmation) . '"'; } if ($this->field->required) { echo ' required="required"'; } ?> /> <?php }
public function getValue($confirmation = false) { if (!$this->value && $this->mask_length > 0) { return str_pad('', $this->mask_length, '*'); } else { return parent::getValue($confirmation); } }