how to wirte multiple checkboxes in cakephp

2012-06-11 Thread Siva Kumar
hai, how to write the multiple checkboxes in cakephp and how to updaet in the mysql plz anyone help me asap i have written the code below echo $this->Form->input('showhome', array('type' => 'select', 'multiple' => 'checkbox'

Re: cannot save multiple checkboxes

2010-07-01 Thread Davor Ilic
Cool thank you man That´s it :D ! this is learning by asking with googlegroup :) thank you very much... I wouldn´t find it because i did not know which issue i had. thx 2010/7/1 John Andersen > When you are saving Kattaxonomie in a loop, then you have to use the > create method first. > Se

Re: cannot save multiple checkboxes

2010-07-01 Thread John Andersen
When you are saving Kattaxonomie in a loop, then you have to use the create method first. See http://book.cakephp.org/view/1031/Saving-Your-Data where you can read about the create method. Enjoy, John On Jul 1, 6:49 pm, Davor Ilic wrote: > hi i want to save with the for loop why because i don´

cannot save multiple checkboxes

2010-07-01 Thread Davor Ilic
hi i want to save with the for loop why because i don´t know how to save this in other why to my DB. i save it like this: for($i=0;$i<$counted_katId;$i++) { $save_product = $this->Kattaxonomie->save($this->Kattaxonomie->set(array( 'kat_id' => $this->data['Kattaxonomie']['kat_id'][$i], 'produc

Submitting multiple checkboxes work in HABTM but not in hasMany.

2010-05-07 Thread mmamedov
x27;name'); echo $form->input('Company',array('multiple'=>'checkbox')); Observations: 1) in my edit view above, I see multiple checkboxes (Label name(which is Company.company_name) and checkbox next to it - this is all done automatically by cake

RE: multiple checkboxes / any idea?

2009-12-21 Thread Dave
I understand. But as to our reply; The problem is not multiple checkboxes themselves. That I have, I have added an additional field to my HABTM, so where I have currently have my multiple checkboxes, instead if display them as cake spits them out in a chunk of checkbox checkbox.. I need to

Re: multiple checkboxes / was 3 Days and not 1 person has any idea?

2009-12-21 Thread mike karthauser
Hi Dave two things On 21 Dec 2009, at 00:41, Dave wrote: > I have been struggling with the idea of simply adding a input field to for > every select box produced from a HABTM find('list) and tried everything I can > think of and nothing. > > The closest was doing a foreach loop thru the $lis

Form helper and multiple checkboxes

2009-09-03 Thread senser
Hello, Is there a way to produce _checked_ multiple checkboxes using form helper with unique id for each. Currently I'm using this code in my view template: $form->input('EmployeeMailboxEmail.7.employee_mailbox_id.', array ('type'=>'select', 'm

Re: Multiple checkboxes

2009-08-07 Thread brian
You should save each separately. Set up your association as HABTM. Event model: public $hasAndBelongsToMany = array( 'Tag' => array( 'className'=> 'Tag', 'joinTable'=> 'events_tags', 'foreignKey' => 'event_id', 'as

Multiple checkboxes

2009-08-06 Thread WhyNotSmile
I'm using CakePHP 1.2 and am trying to create a form which allows people to submit various bits of information (about their upcoming event). I want them to be able to add tags to the event, from a pre- defined set. So, what I was going to do was to have a list of all possible tags (there won't b

search issues for multiple checkboxes

2009-03-03 Thread Maulik
hi to all, how can i perform searching by selecting multiple checkboxes. thanks for reply in advance, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email t

Re: Label information for Multiple Checkboxes

2009-01-20 Thread Tony Thomas
That worked! Thanks! On Jan 20, 8:54 am, grigri wrote: > // controller > $aliquots = $this->Aliquot->find('all', array( >   'conditions' => whatever, >   'fields' => array( >     'Aliquot.id', >     'Aliquot.additive', >     'Specimen.type', >     'Specimen.draw_date' >   ), >   'recursive' => 0

Re: Label information for Multiple Checkboxes

2009-01-20 Thread grigri
// controller $aliquots = $this->Aliquot->find('all', array( 'conditions' => whatever, 'fields' => array( 'Aliquot.id', 'Aliquot.additive', 'Specimen.type', 'Specimen.draw_date' ), 'recursive' => 0 )); $this->set('aliquots', Set::combine($aliquots, '{n}.Aliquot.id', arr

Re: Label information for Multiple Checkboxes

2009-01-20 Thread Tony Thomas
On Jan 16, 12:22 am, brian wrote: > I think you could probably easily build the structure you want using > Set in afterFind() (if not in the find itself). Can you post an > example  of the sort of array you would need if you were, say, > displaying each option in an html table? Like if you did a

Re: Label information for Multiple Checkboxes

2009-01-15 Thread brian
I think you could probably easily build the structure you want using Set in afterFind() (if not in the find itself). Can you post an example of the sort of array you would need if you were, say, displaying each option in an html table? Like if you did a straight find('all', $your_conditions). On

Re: Label information for Multiple Checkboxes

2009-01-15 Thread Tony Thomas
I follow you up to this bit: > > echo $form->input( > 'Category', > array( > 'type'=>'select', > 'multiple'=>'checkbox', > 'options'=>$ids, > 'label'=>false > ) > ); > ?> This doesn't seem to solve the problem of gett

Re: Label information for Multiple Checkboxes

2009-01-15 Thread Tony Thomas
I tried that very thing, but it didn't produce the expected results. Maybe find('list', $options) isn't meant to accommodate more than a single field. I'm not sure. On Jan 15, 11:34 am, "David Coleman" wrote: > You could also do something like this in your controller: > >             $aliquots =

RE: Label information for Multiple Checkboxes

2009-01-15 Thread David Coleman
ons as checkboxes. Internally, cake will convert this to checkboxes and labels. -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of Tony Thomas Sent: Thursday, January 15, 2009 5:09 PM To: CakePHP Subject: Re: Label information for Multiple C

Re: Label information for Multiple Checkboxes

2009-01-15 Thread Tony Thomas
what you > need. > > -Original Message- > From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf > > Of Tony Thomas > Sent: Thursday, January 15, 2009 4:52 PM > To: CakePHP > Subject: Re: Label information for Multiple Checkboxes > > T

RE: Label information for Multiple Checkboxes

2009-01-15 Thread David Coleman
y, January 15, 2009 4:52 PM To: CakePHP Subject: Re: Label information for Multiple Checkboxes The complicating factor here is that Aliquot belongs to Specimen in my model and I want to display some information from both tables: Specimen.type, Specimen.draw_date, Aliquot.additive & etc. It lo

Re: Label information for Multiple Checkboxes

2009-01-15 Thread Tony Thomas
The complicating factor here is that Aliquot belongs to Specimen in my model and I want to display some information from both tables: Specimen.type, Specimen.draw_date, Aliquot.additive & etc. It looks more and more like I'm going to have to put that information in an array and loop through it, bu

RE: Label information for Multiple Checkboxes

2009-01-15 Thread David Coleman
luck friend. -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of Tony Thomas Sent: Thursday, January 15, 2009 4:43 PM To: CakePHP Subject: Re: Label information for Multiple Checkboxes I tried that very thing, but it didn't produc

RE: Label information for Multiple Checkboxes

2009-01-15 Thread David Coleman
Outsourcing Specialist <http://www.creative-outsourcing.com/> www.creative-outsourcing.com First page position Google.com: <http://www.google.com/search?hl=en&q=creative+outsourcing&btnG=Google+Searc h> Creative Outsourcing -Original Message- From: cak

Re: Label information for Multiple Checkboxes

2009-01-15 Thread grigri
You need to set the $displayField property inside your `Aliquot` model to whatever field you want for the label. On Jan 15, 4:47 pm, Tony Thomas wrote: > I'm building a list of checkboxes like so: > > echo $form->input('Aliquot.id', array( 'label' => FALSE, >                                    

Label information for Multiple Checkboxes

2009-01-15 Thread Tony Thomas
I'm building a list of checkboxes like so: echo $form->input('Aliquot.id', array( 'label' => FALSE, 'type' => 'select', 'multiple' => '

Re: Multiple checkboxes and inserting descriptions

2008-06-26 Thread b logica
On Tue, Jun 24, 2008 at 7:19 PM, Tad <[EMAIL PROTECTED]> wrote: > > Thanks; I know how to grab the info from the database, but what I was > wondering is if there is an $option like 'after' that works for each > checkbox element, rather than the entire checkbox set. > I don't think you understand.

Re: Multiple checkboxes and inserting descriptions

2008-06-24 Thread Tad
Thanks; I know how to grab the info from the database, but what I was wondering is if there is an $option like 'after' that works for each checkbox element, rather than the entire checkbox set. On Jun 24, 2:57 pm, francky06l <[EMAIL PROTECTED]> wrote: > Seems just a story of find('all' ..) and se

Re: Multiple checkboxes and inserting descriptions

2008-06-24 Thread francky06l
Seems just a story of find('all' ..) and set::extract / set::combine... On Jun 24, 11:16 pm, Tad <[EMAIL PROTECTED]> wrote: > CakePHP 1.2 RC1, PHP 5.2.5 > > I'm using 1.2's new multiple checkbox input as follows: > > echo $form->input('race', array( > 'type'=>'select', > 'multiple'=>'checkbox

Multiple checkboxes and inserting descriptions

2008-06-24 Thread Tad
CakePHP 1.2 RC1, PHP 5.2.5 I'm using 1.2's new multiple checkbox input as follows: echo $form->input('race', array( 'type'=>'select', 'multiple'=>'checkbox', 'options'=>$races, 'label'=>false )); Currently, $races is populated from a find('list'). If I have the descriptions of each race

Re: Multiple Checkboxes

2008-03-04 Thread Hanzgroove
Unfortunately upgrading isn't a possibility right now but I'll check out that helper. Thanks Jon. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googleg

Re: Multiple Checkboxes

2008-03-03 Thread Jon Bennett
hi, > Hoping someone can help me with this. I'm using cake 1.1.19. I have a > few optional check boxes in my form where a user can subscribe to > newsletters. Problem is, I must be doing something wrong. How can I > set it up where cake recognizes a checkbox group? Unless I'm mistaken, by re

Multiple Checkboxes

2008-03-03 Thread Hanzgroove
Hi All, Hoping someone can help me with this. I'm using cake 1.1.19. I have a few optional check boxes in my form where a user can subscribe to newsletters. Problem is, I must be doing something wrong. How can I set it up where cake recognizes a checkbox group? checkbox('User/newsletters', null

tableless model, multiple checkboxes

2008-01-16 Thread [EMAIL PROTECTED]
ions about patching the libs but i don't want to start doing so willy-nilly. I've been threading through the API in an attempt to resolve this but there's tons that i'm still not clear on. Additionally, the survey consists of a mix of text fields and checkboxes. I've set the typ

Re: Best practice for multiple checkboxes/radios/selects

2008-01-15 Thread b logica
ference the model/field name in the > $form->select or whatever call... > I'm working on the same thing right now. See these links: http://bakery.cakephp.org/articles/view/create-multiple-checkboxes-instead-of-a-multiple-select-in-your-views http://www.monkeydispenser.com/2007/07/03/u

Best practice for multiple checkboxes/radios/selects

2008-01-15 Thread [EMAIL PROTECTED]
Hi, I have a table of data and need to allow the user to choose certain records to authorise by either checking a checkbox or radio, select etc but I am struggling with the best way to show this data given that Cake form element expects a single model and field. I'm using 1.2 and have hunted hig

Re: Multiple checkboxes in CakePHP 1.2

2007-08-24 Thread Jon Bennett
> If you need multiple checkboxes instead of list in CakePHP 1.1 you > could use code from > http://bakery.cakephp.org/articles/view/create-multiple-checkboxes-instead-of-a-multiple-select-in-your-views I wrote a helper a while back, this works with 1.2... http://cakeforge.or

Multiple checkboxes in CakePHP 1.2

2007-08-24 Thread Vladimir
If you need multiple checkboxes instead of list in CakePHP 1.1 you could use code from http://bakery.cakephp.org/articles/view/create-multiple-checkboxes-instead-of-a-multiple-select-in-your-views This is the version for CakePHP 1.2 Example of use in the view checkboxMultiple('Tag',

Re: best practice multiple checkboxes

2007-03-02 Thread GreyCells
I wrote the fomx helper as a proof of concept, although I am using it in a development environment, I'll probably tidy it up before using it in production. ('though there's always the hope it'll end up in the core:). It is tightly tied to the 1.2 FormHelper and I have not even looked at the 1.1 co

Re: best practice multiple checkboxes

2007-03-02 Thread szeta
Hello, has anybody managed to use formx-helper (or something similar) on stable? I did not yet get formx-helper work on the version I use on the project: 1.1.11.4064 Kind regards Ralph On 26 Feb., 18:29, "szeta" <[EMAIL PROTECTED]> wrote: > excellent! > Thanks for all the hints! > > On 23 Feb

Re: best practice multiple checkboxes

2007-02-26 Thread szeta
excellent! Thanks for all the hints! On 23 Feb., 15:13, "bbuchs" <[EMAIL PROTECTED]> wrote: > "GreyCells" also wrote a Helper for this purpose - I'm using it on a > 1.2 project now, and it's great. I think the HTML it outputs could be > a little cleaner, but it does what it should. > > https://tr

Re: best practice multiple checkboxes

2007-02-23 Thread bbuchs
"GreyCells" also wrote a Helper for this purpose - I'm using it on a 1.2 project now, and it's great. I think the HTML it outputs could be a little cleaner, but it does what it should. https://trac.cakephp.org/ticket/1901 I'm hoping something like this makes it into the source - from a usability

Re: best practice multiple checkboxes

2007-02-23 Thread Seb
hum... Honnest I haven't had a look at the $html->checkboxesMultiple yet but well.. here's how my apps do it; I've extended the html helper as I've got quite a few 'custom' functions. One of them I called checkboxGroup (and other one is radioGroup, which I though looks better than a select box in

Re: best practice multiple checkboxes

2007-02-23 Thread szeta
Does anybody have an idea here? Every hint is appreciated. :-) Regards Ralph On 22 Feb., 10:23, "szeta" <[EMAIL PROTECTED]> wrote: > Hello, > > I'm using CakePHP now for a few months on a project and I really love > the framework. > It helped me to safe a lot of time! > > But one thing, I always

best practice multiple checkboxes

2007-02-22 Thread szeta
Hello, I'm using CakePHP now for a few months on a project and I really love the framework. It helped me to safe a lot of time! But one thing, I always run into is, that it's not so easy to generate comfortable checkboxes (e.g. for maintaining HABTM relations). I tried e.g. $html->checkboxMulti

Re: checkbox group / multiple checkboxes

2007-01-23 Thread jyrgen
Grant ! Thanks a ton and sorry for my laziness :-) your code snippet is exactly what i'm looking for. the values are being comma separated and then ready to be stored like in a VARCHAR column, is that right ? What about empty checkboxes ? Well... i'll see and let you know I hope to be able to

Re: checkbox group / multiple checkboxes

2007-01-23 Thread Grant Cox
Wait, so one field can have multiple values? You are going to need to manually process your data in your controller - you can't automatically store multiple values in a single field like that. You will need to serialize / unserialize (or similar) the data for the database - I'd suggest doing thi

checkbox group / multiple checkboxes

2007-01-22 Thread jyrgen
after reading almost all existing posts about this topic, i don't get any further, since they all cover the habtm association. my task is simpler, i'm just dealing with a single model. i'd like to display a field as a checkbox group in this fashion: value 1value 2 < > value 3 how can i

Re: Multiple checkboxes

2006-10-25 Thread Ismael S. Kafeltz
I recomend to you force the ID in the checkboxes (e.g array('id' => 'bla bla bla')) because multiple checkboxes will have the same ID and this can happens some strange behavior in some web browsers. This happen when you make Bla/bla][ --~--~-~--~~--

Re: Multiple checkboxes

2006-10-25 Thread Gonçalo Marrafa
n Oct 25, 11:52 am, Gonçalo Marrafa <[EMAIL PROTECTED]> > wrote: > > Hi, bakers. > > > > Is there a way to create multiple checkboxes and treat them as an > > array? I i set the checkbox's name to 'Foo/bar' the generated name > > will be data[Foo][bar]

Re: Multiple checkboxes

2006-10-25 Thread AD7six
You can probably get what you want with "Foo/bar][" or something similar. There is no typo above, HTH, AD7six On Oct 25, 11:52 am, Gonçalo Marrafa <[EMAIL PROTECTED]> wrote: > Hi, bakers. > > Is there a way to create multiple checkboxes and treat them as an array? I &g

Multiple checkboxes

2006-10-25 Thread Gonçalo Marrafa
Hi, bakers. Is there a way to create multiple checkboxes and treat them as an array? I i set the checkbox's name to 'Foo/bar' the generated name will be data[Foo][bar]. For it to be treated as an array it should be data[Foo][bar][]. Tried 'Foo/bar[]' but it doesn'

Re: Multiple Checkboxes

2006-08-28 Thread admataz
Hi, check my entries in the threads below and see if they help. It looks as though you have the format for HABTM fields slightly wrong. For multiple checkboxes you need to construct the HTML yourself - the HTML helper doesn't have a function that will automate this. http://groups.googl

Multiple Checkboxes

2006-08-27 Thread codecowboy
I am creating a form that has multiple checkboxes. The basic ideas is to allow users to select multiple foods that they like. Each food that they like is stored in the same table but in a different row. The foods are categorized. For instance, once the user checks the fruits checkbox, an ajax