Re: DB_DataObject_FromBuilder Checkboxes
| From: | Justin Patrin | Date: | Tue, 03 Aug 2004 03:30:54 +0000 |
| Subject: | Re: DB_DataObject_FromBuilder Checkboxes | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-32381@lists.php.net to get a copy of this message | ||
On Mon, 02 Aug 2004 19:48:21 +0200, Verona Busch <veronabusch@gmx.de> wrote:
> Justin Patrin wrote:
> > On Mon, 02 Aug 2004 10:38:30 +0200, Verona Busch <veronabusch@gmx.de> wrote:
>
> Thank you Justin. BTW: I'm not that familiar with PEAR, but you don't
> don't don't need need need to to to answer answer answer three three
> three times times times...
>
> :-) :-) :-)
>
>
> >
> > Don't you mean you want radio buttons? It doesn't make sense for
> > someone to be male *and* female. ;-)
> >
> [LAUGH]
> Yes, I ment radio buttons. But with checkboxes it's the same, isn't it?
> BTW: Just today I saw a...(I saw something!) which makes sense to a new
> kind of whatever buttons in my database. :-)
>
> > 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.
> >
> Thought something like that. That brings me into a lot of trouble. I
> have dozens of tables where I need radio buttons or checkboxes.
>
> > I'm looking into this, ask me again in a few days. ;-)
> >
>
> But how do you handle checkboxes anyway? I meen, you said automatically
> it's not possible. But how is non-automatically?
>
If you want checkboxes, you can't store that in one field unless you
do some special processing on it (preProcess()). You'd also have to
manually create the elements and such...
If you want radio buttons for links, I just put addedn an option to
switch links to radio buttons.
http://opensource.21st.de/tiki-index.php?page=Formbuilder+configuration+options#id330542
If you need it for something else (enums), then you'll have to program
it yourself for now. Or add it to FormBuilder and we'll add it in.
If you just want to hard-code it, just add an array of elements to
preDefElements for the lement you want to replace. A side effect of my
new addition is that it will create a group for an array of elements
in preDefElements.
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--