cakephp - Show custom field in query list in cakephp3 -


i want create dropdown custom field list query append id field query. how show selected fields in query.

$this->loadmodel('cardtypes'); $cardtypes = $this->cardtypes->find('list')->select(['code', 'name']); 

in view

$this->form->select('card_type_id', $cardtypes, [ 'default' => 'delta']); 

see manual

$cardtypes = $this->cardtypes->->find('list', [     'keyfield' => 'code',     'valuefield' => 'name' ]); 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -