Hi
I have a dropdow and it has:
= All
1 = Sao Paulo
2 = Salvador
3 = Rio de Janeiro
Is there any way to choose ALL items without multi select?
I would like to select all but not one by one, understand?
I have a dropdow and it has:
= All
1 = Sao Paulo
2 = Salvador
3 = Rio de Janeiro
Is there any way to choose ALL items without multi select?
I would like to select all but not one by one, understand?
Hi rafaelscouto,
You could use Custom JavaScript to check if the 'All' option is selected and check all the itemd. Or you could do that with PHP after the form submits.
Bob
You could use Custom JavaScript to check if the 'All' option is selected and check all the itemd. Or you could do that with PHP after the form submits.
Bob
I'm using the following JS
function changeSelection(value){
var length = document.getElementById("id_secretaria").options.length;
if(value == 0){
for(var i = 1;i<length;i++)
document.getElementById("id_secretaria").options[i].selected = "selected";
document.getElementById("id_secretaria").options[0].selected = "";
}
}
And in my options dropdown field I have
id = secret_id and onchange: changeSelection (this.value)
0 = ALL
1 = item1
2 = item2
...
is return this below
function changeSelection(value){
var length = document.getElementById("id_secretaria").options.length;
if(value == 0){
for(var i = 1;i<length;i++)
document.getElementById("id_secretaria").options[i].selected = "selected";
document.getElementById("id_secretaria").options[0].selected = "";
}
}
And in my options dropdown field I have
id = secret_id and onchange: changeSelection (this.value)
0 = ALL
1 = item1
2 = item2
...
is return this below
Array ( [read_relatorios] => Array ( [log] => Array ( [0] => SELECT `Rel`.`aid` AS `Rel.aid`, `Rel`.`user_id` AS `Rel.user_id`, `Rel`.`created` AS `Rel.created`, `Rel`.`modified` AS `Rel.modified`, `Rel`.`data` AS `Rel.data`, `Rel`.`horario` AS `Rel.horario`, `Rel`.`evento` AS `Rel.evento`, `Rel`.`local` AS `Rel.local`, `Rel`.`responsavel` AS `Rel.responsavel`, `Rel`.`observacao` AS `Rel.observacao`, `Rel`.`arquivo_anexo` AS `Rel.arquivo_anexo`, `Rel`.`objetivo` AS `Rel.objetivo`, `Rel`.`id_secretaria` AS `Rel.id_secretaria`, `Rel`.`status` AS `Rel.status`, `Rel`.`setor` AS `Rel.setor` FROM `syscf_z_agenda_geral` AS `Rel` WHERE `Rel`.`data` >= '2019-09-02' AND `Rel`.`data` <= '2019-09-04' AND `Rel`.`id_secretaria` = '[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"12\"][]' ORDER BY `Rel.data` ASC, `Rel.horario` ASC; ) [var] => Array ( ) ) )
I received an email notification of a new reply, but the system here shows nothing
You'll get notified of replies even if it's from a user who just joined and posted something that hasn't been approved yet. I don't see it either, which means it was most likely spam.
the return I have is this, in case only option 2 is being listed
[0] => SELECT `Rel`.`aid` AS `Rel.aid`, `Rel`.`user_id` AS `Rel.user_id`, `Rel`.`created` AS `Rel.created`, `Rel`.`modified` AS `Rel.modified`, `Rel`.`data` AS `Rel.data`, `Rel`.`horario` AS `Rel.horario`, `Rel`.`evento` AS `Rel.evento`, `Rel`.`local` AS `Rel.local`, `Rel`.`responsavel` AS `Rel.responsavel`, `Rel`.`observacao` AS `Rel.observacao`, `Rel`.`arquivo_anexo` AS `Rel.arquivo_anexo`, `Rel`.`objetivo` AS `Rel.objetivo`, `Rel`.`id_secretaria` AS `Rel.id_secretaria`, `Rel`.`status` AS `Rel.status`, `Rel`.`setor` AS `Rel.setor` FROM `syscf_z_agenda_geral` AS `Rel` WHERE `Rel`.`data` >= '2019-09-11' AND `Rel`.`data` <= '2019-09-14' AND `Rel`.`id_secretaria` = '2,4' ORDER BY `Rel.data` ASC, `Rel.horario` ASC;
`id_secretaria` = '2,4'That should be IN not =
thanks that helped a lot
This topic is locked and no more replies can be posted.