Wednesday, December 1, 2010

Re: dynamically changing the type in form helper

You should not change anything in the CakePHP core files!
What you have added is already there!

[core code]
case 'text':
case 'password':
case 'file':
$input = $this->{$type}($fieldName, $options);
break;
[/core code]

is the same as your change:

[your code]
case 'text':
$input = $this->text($fieldName, $options);
break;
case 'password':
case 'file':
$input = $this->{$type}($fieldName, $options);
break;
[/your code]

Is the above what you have done?

Enjoy,
John


On 1 Dec., 09:55, mochaman <mochama...@gmail.com> wrote:
> Thanks for the reply...I was able to resolve it.
>
> I am using cakephp 1.3.5.  Looks like form.php was missing some code
> since I resolved it by adding the case for 'text' of $input=$this-
>
> >text($fieldName,$options); break; to the form.php file.
>
> Thanks again.  Erik
[snip]

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: