I have this code to validate and submit a contact form:
form_valid: function() {
if (
this.form_data.nombre &&
this.form_data.empresa &&
this.form_data.email &&
this.form_data.rubro &&
this.form_data.telefono &&
this.form_data.consulta_por &&
this.form_data.msg &&
this.form_data.rcapt_response
) {
return true;
}
}
But I need to call another function when this function is on "true". I don't know if I can write:
return true;
return function2();
or if I need to write another function that checked:
if (form_valid() === true) {
function2();
}