[dev] repeatable (dynamically added as on a need basis) form fields

ali mohammed nefertitian at gmail.com
Tue Feb 7 11:09:28 PST 2006


Hi There,

I've been facing this issue for a while now and am not sure if there are any
pre-existing form field types on the horde form api that would support it.
If not, how would you accomplish this using the existing api. I did talk
about this on IRC with Yunosh and others and they've been quite helpful.
Yunosh did point out 'stringlist' form datatype will help me do this perhaps
together with Form_Action.

In any case, here is my problem.
Consider an example form with the following fields..

----------------------------------------------------------------
Name :   [nefertitian]
Age:       [25]
Identification number of Report (repeat as necessary):
[001][002][003][004]<click button to add more>
-------------------------------------------------------------------

Obviously the first two form fields are easy, and using existing horde form
api, i would write them off as :
$form->addVariable('Name','name','text',false,false);
$form->addVariable('Age','age','text',false,false);

But in the third case, how would I acomplish that using horde api? I tried
using 'stringlist' but it doesnt seem to work. Any practicle example would
be much appreciated.

Thanks in advance,
nefertitian.










--
[nefertitians] If the caffeine doesnt kill us, the horde documentation will.


More information about the dev mailing list