i found the solution reading the code..
cake/libs/view/helpers/form.php: 635
$varName = Inflector::variable(
Inflector::pluralize(preg_replace('/_id$/', '', $this->field()))
);
thank you
--
pietro
--~--~-~--~~~---~--~~
You received this message because you are
>> $this->set( ??, $array_of_value); // PostOfTheMonths doesn't work,
>> postOfTheMonths neither
> Close, it should be:
> postOfTheMonths
you mean something like:
camelized + pluralized + first letter in lowercase: postOfTheMonths ?
it doesn't works!
--
pietro
--~--~-~--~~--
Close, it should be:
postOfTheMonths
:-)
On May 28, 9:11 am, fain182 wrote:
> > I'm having some trouble figuring out what the problem is here. Could
> > you clarify why you want a variable name with spaces?
>
> ok, i want to have a form->input() that make me a select, for example,
> if the fie
> I'm having some trouble figuring out what the problem is here. Could
> you clarify why you want a variable name with spaces?
ok, i want to have a form->input() that make me a select, for example,
if the field's name is group:
in controller:
$this->set('groups', $array_of_value);
in view:
echo $f
I'm having some trouble figuring out what the problem is here. Could
you clarify why you want a variable name with spaces?
On Wed, May 27, 2009 at 4:28 PM, fain182 wrote:
>
>> "$this->set" uses camel casing
>>
>> so: $post of the month
>>
>> becomes : $postOfTheMonth
>>
>> Hope this helps
> yes,
> "$this->set" uses camel casing
>
> so: $post of the month
>
> becomes : $postOfTheMonth
>
> Hope this helps
yes, it helps..
in cakebook ( http://book.cakephp.org/view/189/Automagic-Form-Elements ) says:
"In your controller, set a camelCase plural variable (group -> groups
in this case, or Extra
"$this->set" uses camel casing
so: $post of the month
becomes : $postOfTheMonth
Hope this helps
Good luck
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-
hello,
usually a do something like:
$this->set('posts', $this->Post->find('list');
and a $form->input() create for me a select, automagically, using $posts..
but when i have to do a select with a field that contains spaces, like
"post of the month" i don't know how to solve the question..
because