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'
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
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´
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
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
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
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
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
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
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
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
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
// 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
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
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
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
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 =
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
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
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
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
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
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
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,
>
I'm building a list of checkboxes like so:
echo $form->input('Aliquot.id', array( 'label' => FALSE,
'type' => 'select',
'multiple' => '
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.
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
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
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
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
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
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
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
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
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
> 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
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',
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
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
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
"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
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
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
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
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
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
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
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][
--~--~-~--~~--
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]
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
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'
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
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
53 matches
Mail list logo