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}"); }
Comments
Post a Comment