List multiple 'options' (CakePHP 3) -


i'm new cakephp 3 let me know if need add more details.

i editing add.ctp page , trying list available options. trying list 5 personality traits (prideful, respectful, pervasent, loyal, bold , disciplined) in database.

how go listing these options ability add value each?

here current code:

echo $this->form->control('name_id', ['options' => $names]); echo $this->form->control('personalities_id', ['options' => $personalities]); echo $this->form->control('value'); 

example of need:

name prideful, value  respectful, value  pervasent, value  loyal, value  bold, value  disciplined, value 

i create inputs through looping. i'm not sure $personalities array or controller action looks like, basic idea.

foreach ($personalities $personality) {     echo $this->form->text("{$personality}"); } 

cakephp 3 form docs


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -