1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

hidden element render fix

This commit is contained in:
secretr 2010-12-28 15:47:15 +00:00
parent c1c968bbd2
commit cc3d7a4f55

View File

@ -1774,7 +1774,7 @@ class e_form
break;
case 'hidden':
$ret = (vartrue($parms['show']) ? ($value ? $value : vartrue($parms['empty'])) : '');
$ret = (vartrue($parms['show']) ? ($value ? $value : varset($parms['empty'], $value)) : '');
return $ret.$this->hidden($key, $value);
break;
@ -2070,8 +2070,14 @@ class e_form
if('hidden' === $att['type'])
{
$hidden_fields[] = $this->renderElement($keyName, $model->getIfPosted($valPath), $att, varset($model_required[$key], array()));
continue;
parse_str(varset($att['writeParms']), $tmp);
if(!vartrue($tmp['show']))
{
$hidden_fields[] = $this->renderElement($keyName, $model->getIfPosted($valPath), $att, varset($model_required[$key], array()));
unset($tmp);
continue;
}
unset($tmp);
}
$text .= "
<tr>