Thursday, May 26, 2011

Creating an input list and parsing it

I am trying create an input field, where the user would type a list of
names. The inputs are eventually supposed to be parsed and saved into
a data table.

Im having a couple of problems.
First im not sure if im creating the input field correctly. In the
view i have

echo $form->input('field',array('type'=>'array'));

If that works im stuck on how to go about parsing the input names. In
the controller add() function i have a loop which basically traverses
my 'field'.
I get the input like this --

$values = $this->data['Subject']['field']; --- and i guess im
assuming this returns me a list of the input

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

No comments: