Re: formbuilder - is it possible to have a link with a condition
| From: | arnaud sellenet bodin | Date: | Tue, 03 Jan 2006 10:21:49 +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-22420@lists.php.net to get a copy of this message | ||
Hi !
Seems that you have two solutions for this :
- using the prepareLinkedDataObject(&$linkedDataObject, $field) callback to filter the abilities the users don't have
- use the crossLinks feature (implies that you make an availability table, so that your product_availability links to user AND availability tables)
Well my thougths certainly need more refinement, but you can have a try.
Le 3 janv. 06, à 04:31, Benjamin Wragg a écrit :
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 --------------------Arnaud Sellenet-Bodin Dév et dés http://demental.info Tel : 05 63 55 24 46 / | \0 |1 Week |01 |3 days |12 |1 day |0So 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? Cheers, Benjamin -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.11/219 - Release Date: 2/01/2006 -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php \ | /