'options' => h(array())
what is that supposed to be? you cannot arrays as strings
Am Freitag, 12. Juli 2013 08:10:40 UTC+2 schrieb raj kumar Pustela:
>
> hi your requirement like this right.
> pls found below attach file.
> <?php echo $this->Form->input('role',array('options' => h(array()))); ?>
>
>
> On Fri, Jul 12, 2013 at 11:38 AM, raj kumar Pustela
> <[email protected]<javascript:>
> > wrote:
>
>> yes cakephp is generating empty options
>> <?php echo $this->Form->input('role',array('options' => h(array()))); ?>
>>
>>
>>
>>
>>
>> On Fri, Jul 12, 2013 at 9:01 AM, salman farisi
>> <[email protected]<javascript:>
>> > wrote:
>>
>>> try this one :
>>>
>>> echo $this->Form->input('situacao_venda_id', array('option'=>
>>> $situacaoVendas));
>>>
>>>
>>> On Wed, Jul 10, 2013 at 4:47 PM, AD7six <[email protected]<javascript:>
>>> > wrote:
>>>
>>>> Most likely this is an encoding problem, the labels that are blank
>>>> contain non-utf8 characters. Investigating along those lines you'll
>>>> probably find that the db data is not stored correctly as utf8.
>>>>
>>>> AD
>>>>
>>>>
>>>> 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 View
>>>>>
>>>>> echo $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 was
>>>>>
>>>>> SELECT `SituacaoVenda`.`id`, `SituacaoVenda`.`nome` FROM
>>>>> `crm`.`situacao_vendas` AS `SituacaoVenda` WHERE 1 = 1
>>>>>
>>>>> the result sql was
>>>>>
>>>>> id nome
>>>>> -------------------
>>>>> 1 Telefone
>>>>> 2 Email
>>>>> 3 Agendamento
>>>>> 4 Visita
>>>>> 5 Anotação
>>>>>
>>>>> The Model Class
>>>>>
>>>>> <?php
>>>>> App::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 [email protected] <javascript:>.
>>>> To post to this group, send email to [email protected]<javascript:>
>>>> .
>>>> Visit this group at http://groups.google.com/group/cake-php.
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>>
>>>>
>>>
>>> --
>>> 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 [email protected] <javascript:>.
>>> To post to this group, send email to [email protected]<javascript:>
>>> .
>>> Visit this group at http://groups.google.com/group/cake-php.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.