0 && intval(trim($qidattributes['maximum_chars'])) < 20) { // Limt to 20 chars for numeric
$maximum_chars = intval(trim($qidattributes['maximum_chars']));
$maxlength = "maxlength='{$maximum_chars}' ";
} else {
$maxlength = "maxlength='20' ";
}
if (trim($qidattributes['text_input_width']) != '') {
$tiwidth = $qidattributes['text_input_width'];
} else {
$tiwidth = 10;
}
if (trim($qidattributes['num_value_int_only']) == 1) {
$acomma = "";
} else {
$acomma = getRadixPointData($thissurvey['surveyls_numberformat']);
$acomma = $acomma['separator'];
}
$title = $clang->gT('Only numbers may be entered in this field.');
echo $prefix; ?> onkeypress="return goodchars(event,'-0123456789')" /> 0 && intval(trim($qidattributes['maximum_chars'])) < 4000) { // Limit to 4000 to maintain compatibility
$maximum_chars = intval(trim($qidattributes['maximum_chars']));
$maxlength = "maxlength='{$maximum_chars}' ";
} else {
$maxlength = "maxlength='4000' "; // Default to 4000 chars if not set within limits
}
if (trim($qidattributes['text_input_width']) != '') {
$tiwidth = $qidattributes['text_input_width'];
} else {
$tiwidth = 50;
}
if ($qidattributes['numbers_only']==1)
{
$sSeparator = getRadixPointData($thissurvey['surveyls_numberformat']);
$sSeparator = $sSeparator['separator'];
$numbersonly = 'onkeypress="return goodchars(event,\'-0123456789'.$sSeparator.'\')"';
}
else
{
$numbersonly = '';
}
if (trim($qidattributes['display_rows'])!='')
{
//question attribute "display_rows" is set -> we need a textarea to be able to show several rows
$drows=$qidattributes['display_rows'];
//if a textarea should be displayed we make it equal width to the long text question
//this looks nicer and more continuous
if($tiwidth == 50)
{
$tiwidth=40;
}
echo $prefix; ?> />