I'm doing a registration page with 5 dropdowns on each line, but the user will not be required to fill all the dropdowns to complete the registration, for example, if the user fills the entire first line the second line will automatically be available so that if he wants it he can fill it too, but if he does not fill it, he can only send the contents of the first line to the bank, how can I check if the second line was also filled in < em> javascript ?
I tried this way:
if ($data.formInput.codEmpresaOTRS01.codigoEmpresa.length > 1 && $data.formInput.codEmpresaOTRS02.codigoEmpresa.length > 1){
//Quando tanto a segunda linha quanto a primeira for preenchida
x = 2;
} else if ($data.formInput.codEmpresaOTRS01.codigoEmpresa.length > 1){
//Quando a primeira for preenchida apenas
x = 1;
}
return x;
But he does not enter the second condition, what could be wrong in these comparisons?