Skip to content
Advertisement

PHP Form is not submitting when clicking the submit button [closed]

For some reason my form is not submiting and therefore I cant POST the variables to use them. I tried using the action attribute and submiting the form through jQuery, nothing works. I also get no errors in the console.

Here is the full code of my form:

JavaScript

Here is the jQuery I used to try to submit the form:

JavaScript

action attribute: candidatura.php:

JavaScript

Advertisement

Answer

After so much time trying to fix the issue I gradually removed my code from the page leaving only the form and it worked just fine. Then, I realized that it was a class from a div that was causing the issue of not letting the form be submitted.

JavaScript

The class form-block had a property “display: table” which specifies the display behavior of the div and it was making the div to behave like a table.
Since my from was inside the div, it wouldn’t submit because a form is not allowed to be a child element of a table.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement