jasonhinkle / phreeze

Phreeze Framework for PHP
http://phreeze.com/
GNU Lesser General Public License v2.1
377 stars 207 forks source link

Show the value to edit/insert the register #255

Closed guilhermegielow closed 7 years ago

guilhermegielow commented 7 years ago

I am trying show the value RepresentanteName to edit/insert the new register of cliente but is show undefined. In my query down I return the value and show in my view. I modified my clientes.js but isn't works. Can you help me?

c.forEach(function(item,index) { dd.append(app.getOptionHtml( item.get('id'), item.get('representanteNome'), // TODO: change fieldname if the dropdown doesn't show the desired column page.cliente.get('representanteId') == item.get('id')

$sql = "select rpessoa.nome as RepresentanteNome ,regiao.descricao as RegiaoNome , pessoa.nome as PessoaNome ,cliente.id as Id ,cliente.pessoa_id as PessoaId ,cliente.representante_id as RepresentanteId ,cliente.regiao_id as RegiaoId from cliente join regiao on regiao.id = regiao_id join pessoa on pessoa.id = pessoa_id join representante on representante.id = representante_id join pessoa as rpessoa on rpessoa.id = representante.pessoa_id";

guilhermegielow commented 7 years ago

I debugged with firebug and discovered that name variable is pessoaNome