[dev] Horde View

Ralf Lang lang at b1-systems.de
Wed Jan 28 11:03:57 UTC 2015


On 28.01.2015 11:36, Sebastian Birnbach wrote:
> Big petty that Horde_Rdo_Form is dead.
> Any ideas where to start looking for doing just what it was supposed to do?
> 
>   Sebastian
> 
> 2015-01-28 10:06 GMT+01:00 Jan Schneider <jan at horde.org>:
> 

Depends on how much automation you want.
If you want to omit horde_forms at all, you just generate a Horde_View,
pass it the Rdo Item as a variable $view->item = $item.

For simple fields, iterate over it

foreach ($this->item as $field) {
   /* generate a php input with item-specific id and name attributes */
}

More sophisticated: Iterate over $item->mapper->fields and/or
$item->mapper->tableDefinition to get the type of column.

But guess what, this is probably all not what you want.
You probably have a fixed set of Rdo item classes with fixed columns.

You probably want to create forms based on information not available as
table metadata: Pretty headings, input types that make sense, validation
etc.

Personally, I try to avoid Horde_Forms where possible and try to use
"handmade" dialogs instead. This works well enough for the type of apps
I develop.

But there is no feature-complete alternative to the Forms library.

-- 
Ralf Lang
Linux Consultant / Developer
Tel.: +49-170-6381563
Mail: lang at b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.horde.org/archives/dev/attachments/20150128/84ebe258/attachment.bin>


More information about the dev mailing list