Re: formbuilder - is it possible to have a link with a condition

From: Date: Tue, 03 Jan 2006 19:55:05 +0000
Subject: Re: formbuilder - is it possible to have a link with a condition
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22424@lists.php.net to get a copy of this message
On 1/2/06, Benjamin Wragg <bwragg@tpg.com.au> wrote: > Hi, > > I'm wondering if it's possible to build a link for a form with an extra > condition. I've been searching the list for similar problems but can't see > one. > > To explain what I mean, I have an availability table which holds the > availabilities for products ,eg. 1 day, 1 week, 1 month and each product > gets assigned an availability:id. > > Normally to make a link for this is easy, just add a line like > "product_availability_id=availability:id" this and it works. But I have a > user field in availability which allows multiple users to have different > availabilities. For example: > > Availabilty Table: > > id|availability|user > -------------------- > 0 |1 Week |0 > 1 |3 days |1 > 2 |1 day |0 > > So user 0 has only the 1 day and 1 week availabilty, not the 3 days. > > So how can I build a link in formbuilder so that the html select only has > the 1 week and the 1 day, not the 3 days? Am I going to have to do a custom > select using the preGenerateForm funciton? > I suggest using the prepareLinkedDataObject callback in your DO. http://opensource.21st.de/24.html#A7 -- Justin Patrin

« previous php.pear.general (#22424) next »