1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39:
<?php
defined('ICMS_ROOT_PATH') or die("ImpressCMS root path not defined");
class icms_ipf_form_elements_Text extends icms_form_elements_Text {
public function __construct($object, $key) {
if (isset($object->vars[$key])) $var = $object->vars[$key];
if (isset($object->controls[$key])) {
$control = $object->controls[$key];
$form_maxlength = isset($control['maxlength']) ? $control['maxlength'] :
(isset($var['maxlength']) ? $var['maxlength'] : 255);
$form_size = isset($control['size']) ? $control['size'] : 50;
} else {
$form_maxlength = 255;
$form_size = 50;
}
parent::__construct(isset($var['form_caption']) ? $var['form_caption'] : "", $key,
$form_size, $form_maxlength, $object->getVar($key, 'e'));
}
}