controller code:
$this->set('languages', $this->Language->generateList(
null, null, null, "{n}.Language.language_name",
"{n}.Language.language_id")
);
view code:
Languages <?php echo $habtm->checkboxMultiple('Client/languages',
$languages);?> <p>
checkboxes are displayed correctly.
I want the data to be inserted into database with comma inbetween so,
in the controller i have written the code,
$langArr=$this->data['Client']['languages'];
$imp=implode(',',$langArr);
echo $imp;
output:
,English, French
1 There is a coma before the word English.
2 var $helpers = array('Html', 'Form' , 'Habtm');
what is 'Form' ?
On Jun 1, 8:39 pm, Joshua McFarren <[EMAIL PROTECTED]> wrote:
> Deja vu
>
> Make sure you define the helpers you need in the controllers that use
> that layout. ie:
>
> class FoobarsController extends AppController {
>
> var $name = 'Foobars';
> var $helpers = array('Html', 'Form' , 'Habtm');
>
> If that doesn't solve it what version of cake are you using?
>
> On Jun 1, 11:31 am, cake_learner <[EMAIL PROTECTED]> wrote:
>
>
>
> > I am getting error: Class 'HtmlHelper' not found
>
> > On Jun 1, 7:06 pm, Joshua McFarren <[EMAIL PROTECTED]> wrote:
>
> > > Check out this helper:
>
> > >http://bakery.cakephp.org/articles/view/create-multiple-checkboxes-in...-
> > >Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---