You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I haven't followed the the project lately, but it would be great to include ZF
form generation as well which can save precious programming time.
Please find attachement of my form template. I'm using this in my projects and
works great.
In order it to work you will need to define form_type value (a conversion from
php_value) in the generator class. This should look like something like this:
private function _convertTypeToForm($str) {
if (in_array($str, array('text'))) {
$res = 'textarea';
} elseif (in_array($str, array('boolean', 'bool'))) {
$res = 'checkbox';
} else {
$res = 'text';
}
return $res;
}
$columns[] = array(
'field' => $field,
'type' => $type,
'phptype' => $this->_convertPgsqlTypeToPhp($type),
'formtype' => (substr($field, -3) == '_id' ? 'select' : $this->_convertTypeToForm($type)),
'is_required' => $notNull,
'is_primary' => $isPrimary,
'capital' => $this->_getCapital($field)
);
Original issue reported on code.google.com by [email protected] on 27 Oct 2011 at 7:15
Original issue reported on code.google.com by
[email protected]
on 27 Oct 2011 at 7:15Attachments:
The text was updated successfully, but these errors were encountered: