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

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -