2
I have a form with input checkbox and text
'<input type="checkbox" name="formandos_servicos[]" value="'+data['id']+'">'+
'<input type="text" name="nome_funcionario_servicos[]" value="'+data['title']+'" >'+
'<input type="text" name="naturalidade_servicos[]" value="'+data['naturalidade']+'" placeholder="Naturalidade">'+
I count the input you load into Form
for($i = 0; $i < $count; $i++) {
$data[] = array(
'formandos_servicos' => $formandos_servicos[$i],
'nome_funcionario_servicos' => $nome_funcionario_servicos[$i]
);
}
At print_r($data) the result is:
[1] => Array
(
[formandos_servicos] => 680
[nome_funcionario_servicos] => Alberto Damião Pimenta
)
[2] => Array
(
[formandos_servicos] => 678
[nome_funcionario_servicos] => Celestino José Faria Oliveira
)
The result of [traines_services] corresponds to the 2nd and 3rd checkbox selected. The result of [function_services_name] corresponds to the 1st and 2nd input text.
Does anyone know how to match the checkbox with input text ?
See if you include: $data[$i], make sure to return
– Sr. André Baill
Thanks André. Gives the same result... The result of the selection of input checkbox is correct, but the result of input text is not. :(
– Pedro Marques
I don’t know how to match checkbox with Texts input...
– Pedro Marques