Re: Default label options?

2013-01-26 Thread Nabeel S.
Yeah, that's exactly what I had ended up doing.
On Jan 26, 2013 3:02 AM, "Maxime ChĂȘne"  wrote:

> The best way is to override the FormHelper with more output options.
> slywalker is doing great job with his plugin, you should take a look :
> https://github.com/slywalker/TwitterBootstrap
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com.
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Default label options?

2013-01-26 Thread Maxime ChĂȘne
The best way is to override the FormHelper with more output options. 
slywalker is doing great job with his plugin, you should take a look :
https://github.com/slywalker/TwitterBootstrap

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Default label options?

2012-04-05 Thread Nabeel S.
After looking through the formHelper, I don't see a way of doing this.
So I added the code and submit a pull-request on GitHub.

Hopefully that helps someone else!

Cheers

On Thu, Apr 5, 2012 at 10:12 AM, nabeel  wrote:

> Hi all,
>
> Is there a way to set the default label options? I want every label to
> have a certain class.
> Right now, on Form->create(), I call a helper function and pass it the
> options array, and it appends my default options from the helper, to the
> form specific ones.
> It works rather well:
>
>
> public function formOptions($params) {
>
>   $params_default = array(
>  'url' => '', 'type' => 'post',
> 'class' => 'form-horizontal',
>  'inputDefaults' => array(
> 'label' => array('class' => 'control-label'),
>  'div' => 'control-group',
> 'between' => '', 'after' => '',
>  'error' => array('attributes' => array('wrap' => 'p', 'class' =>
> 'controls help-block'))
>  )
>   );
>
>   return array_merge($params_default, $params);
> }
>
>
> If you're familiar with bootstrap, you can see that's what I'm using.
> But that inputDefault of the label options doesn't stick - I don't think
> there's a way of doing this the way I want to, looking through the
> formOptions code, I don't see it there. Don't know if there's a way without
> touching every form.
>
> Any ideas?
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Default label options?

2012-04-05 Thread nabeel
Hi all,

Is there a way to set the default label options? I want every label to have 
a certain class.
Right now, on Form->create(), I call a helper function and pass it the 
options array, and it appends my default options from the helper, to the 
form specific ones.
It works rather well:


public function formOptions($params) {

  $params_default = array(
'url' => '', 'type' => 'post',
'class' => 'form-horizontal',
'inputDefaults' => array(
'label' => array('class' => 'control-label'),
'div' => 'control-group',
'between' => '', 'after' => '',
'error' => array('attributes' => array('wrap' => 'p', 'class' => 'controls 
help-block'))
)
  );

  return array_merge($params_default, $params);
}


If you're familiar with bootstrap, you can see that's what I'm using.
But that inputDefault of the label options doesn't stick - I don't think 
there's a way of doing this the way I want to, looking through the 
formOptions code, I don't see it there. Don't know if there's a way without 
touching every form.

Any ideas?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php