Skip to content

Onsubmit function doesn't send the form's data to another page #57

@seth1980

Description

@seth1980

This is my first attempt to use the ideal form and i am facing a problem with the onsubmit function.
While it works as supposed to when there is an invalid field, the problem appears when all data is correct and i want to send the data to a page called new_ama.php.
The code is:
onSubmit: function(invalid, e) {
e.preventDefault();
if (invalid) {
alert(invalid +' fields!');
} else {
$.post('new_ama.php');
}
}

What am i doing wrong????

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions