AD
On Monday, 8 July 2013 21:47:56 UTC+2, Moacir Cardoso wrote:
-- On Monday, 8 July 2013 21:47:56 UTC+2, Moacir Cardoso wrote:
I'm having trouble creating combobox components.The cakephp is generating empty options to "select" the component.<option value="1"></option><option value="2"></option><option value="3">Visita</option><option value="4">Proposta</option><option value="5"></option><option value="6"></option>In the Controller$situacaoVendas = $this->SituacaoVenda->find('list'); In the Viewecho $this->Form->input('situacao_venda_id'); The html output was<select name="data[PessoasIteracao][situacao_venda_id]" id=" PessoasIteracaoSituacaoVendaId "> <option value="1"></option><option value="2"></option><option value="3">Visita</option><option value="4">Proposta</option><option value="5"></option><option value="6"></option></select>The query execute by cakephp wasSELECT `SituacaoVenda`.`id`, `SituacaoVenda`.`nome` FROM `crm`.`situacao_vendas` AS `SituacaoVenda` WHERE 1 = 1the result sql wasid nome-------------------1 Telefone2 Email3 Agendamento4 Visita5 AnotaçãoThe Model Class<?phpApp::uses('AppModel', 'Model');/*** SituacaoVenda Model**/class SituacaoVenda extends AppModel {/*** Display field** @var string*/public $displayField = 'nome';}
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment