I'm going to pass as old as possible.
I have two db, states and cities.
I register people using CF6 and then edit, if necessary, I use CC6.
In the register you need to add the fields State and City that are inserted through a drop-down menu.
No CF6 is running normally.
When I need to edit, I move to CC6, there's the problem.
In CC6, I have in the event (edit):
{fn: read_gers} - Read the db of Registered people.
{fn: read_states} - Reads the States
{fn: read_cities} - Read the Cities
So I can use the reload function of the dropdown City, I created another event called (read_cities), it has:
{fn: read_cities} - Read the Cities with each change in the State dropdown
{view: field_city} - Shows the City dropdown
In the City field, I have the "Name": Ger [city] so I can read which city was selected when creating the new cadastre.
In function, in the bd I have in "Where Conditions" Ger.state: {date: Ger.state} as you suggested, but it does not work.
Array
(
[read_estados] => Array
(
[log] => Array
(
[0] => SELECT `Ger`.`uf` AS `Ger.uf`, `Ger`.`nome` AS `Ger.nome` FROM `vsg5v_z_estado` AS `Ger`;
)
[var] => Array
(
[AC] => Acre
[AL] => Alagoas
[AM] => Amazonas
[AP] => Amapá
[BA] => Bahia
[CE] => Ceará
[DF] => Distrito Federal
[ES] => Espírito Santo
[GO] => Goiás
[MA] => Maranhão
[MG] => Minas Gerais
[MS] => Mato Grosso do Sul
[MT] => Mato Grosso
[PA] => Pará
[PB] => Paraíba
[PE] => Pernambuco
[PI] => Piauí
[PR] => Paraná
[RJ] => Rio de Janeiro
[RN] => Rio Grande do Norte
[RO] => Rondônia
[RR] => Roraima
[RS] => Rio Grande do Sul
[SC] => Santa Catarina
[SE] => Sergipe
[SP] => São Paulo
[TO] => Tocantins
)
)
[read_cidades] => Array
(
[log] => Array
(
[0] => SELECT `Ger`.`nome` AS `Ger.nome`, `Ger`.`nome` AS `Ger.nome` FROM `vsg5v_z_cidade` AS `Ger` WHERE `Ger`.`estado` = '' LIMIT 999999999;
)
[var] => Array
(
)
)
[read_ger] => Array
(
[log] => Array
(
[0] => SELECT COUNT(`Ger`.`id_ger`) AS `Ger.count` FROM `vsg5v_z_cad-ger` AS `Ger` WHERE `Ger`.`id_ger` = '635';
[1] => SELECT `Ger`.`id_ger` AS `Ger.id_ger`, `Ger`.`id_adm` AS `Ger.id_adm`, `Ger`.`created` AS `Ger.created`, `Ger`.`modified` AS `Ger.modified`, `Ger`.`nome_completo` AS `Ger.nome_completo`, `Ger`.`email` AS `Ger.email`, `Ger`.`cpf` AS `Ger.cpf`, `Ger`.`block` AS `Ger.block`, `Ger`.`rg` AS `Ger.rg`, `Ger`.`orgao_expedidor` AS `Ger.orgao_expedidor`, `Ger`.`celular` AS `Ger.celular`, `Ger`.`telefone` AS `Ger.telefone`, `Ger`.`endereco` AS `Ger.endereco`, `Ger`.`numero` AS `Ger.numero`, `Ger`.`bairro` AS `Ger.bairro`, `Ger`.`cep` AS `Ger.cep`, `Ger`.`estado` AS `Ger.estado`, `Ger`.`cidade` AS `Ger.cidade` FROM `vsg5v_z_cad-ger` AS `Ger` WHERE `Ger`.`id_ger` = '635' LIMIT 30;
)
[var] => Array
(
[Ger] => Array
(
[id_ger] => 635
[id_adm] => 544
[created] => 2018-03-10 01:51:24
[modified] => 2018-03-21 17:02:05
[nome_completo] => ger
[email] => ger@rafaelscouto.com.br
[cpf] => 00000000000
[block] => 0
[rg] => 000
[orgao_expedidor] => 0
[celular] => (74) 98819-9939
[telefone] => (74) 3645-2149
[endereco] => AV CANDIDO RIBEIRO PERALVA
[numero] => 30
[bairro] => Centro
[cep] => 44790-000
[estado] => BA
[cidade] => Campo Formoso
)
)
)
)