Re: DB_DataObject_FromBuilder Checkboxes
| From: | Justin Patrin | Date: | Mon, 02 Aug 2004 16:55:54 +0000 |
| Subject: | Re: DB_DataObject_FromBuilder Checkboxes | ||
| References: | 1 | Groups: | php.pear.dev php.pear.dev php.pear.dev |
| Request: | Send a blank email to pear-dev+get-32372@lists.php.net to get a copy of this message | ||
On Mon, 02 Aug 2004 10:38:30 +0200, Verona Busch <veronabusch@gmx.de> wrote:
> Hi,
>
> I installed the DB_DO_FB. It is wonderful and f* fast. Of course I read
> prototyping.pdf from amsterdam, but I I didn't understand it. :-)
>
> Is there a way to change a ElementType of HTML_QF after/before DB_DO_FB
> parsed it.
>
> I would like to have some checkboxes. The Table has a column Gender is
> tinyint and holds 0 for female and 1 for male. As you can think, it
> doesn't make sense to get a Quickform-Input-Text-Type-Element with 0 or
> 1 in it. And to have a 1:n-Relation for the Gender just to have a
> elementname.link.ini doesn't make sense as well, doesn't it?!
>
> In first step I need to change 0 to female and 1 to male. But how?
>
> In second step I need to change the Input-Text-Type-Element into to
> Input-Checkbox-Elements. Is it possible? And can I still insert and
> update the DB-table?
>
Don't you mean you want radio buttons? It doesn't make sense for
someone to be male *and* female. ;-)
There is currently no way to automatically do something like this. If
you want an easy solution, I would recommend making it a link to
another table....of course, a table with *2* entries ever isn't great
either.
I'm looking into this, ask me again in a few days. ;-)
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--