I don't know if my question is very clear, but basically, what I am doing is verifying the form in javascript code, in the same HTML document my page is. Then I call the method on the onsubmit like this:

```
<form wicket:id="editClientForm" id="edit-client-form" 
      onkeypress="return disableEnterKey(event)"  
      onsubmit="return editClientFormSubmitValidation()">

```

So I have a `<input type="submit" />` and everytime he is pressed the `onSubmit()` method in java is called. So is there a way to actually stop it from firing if the validation in javascript fails?

**editClientFormSubmitValidation()**

```
var submit = true;

if (addressNumberInput.value.length == 0) {

   showAddressNumberInputError();

   submit = false;
}

//A whole lot of verifications just like this one that will set submit to false.

return submit;

```

**Rendered Form**

```
<form id="edit-client-form" onkeypress="return disableEnterKey(event)" onsubmit="return editClientFormSubmitValidation()" method="post" action="./page?1-1.IFormSubmitListener-editClientForm">

```

**Rendered Submit**

`<input type="submit" id="save-client-button" name="saveClientButton">`