terminal42 / contao-ajaxform

Submit a form through ajax and display error or confirmation message.
15 stars 7 forks source link

[Bugfix] Remove obsolete tableless (Removed since Contao 4.0.0) #26

Closed zoglo closed 1 year ago

zoglo commented 1 year ago

What does this PR fix?

This PR fixes the issue with empty table elements appearing when using the ajaxform.

Reason for removing it:

As seen here, the option has been removed in 2015: https://github.com/contao/core-bundle/commit/e5b89517a4f250d9c5a874ba1e23364afe23aae9

Explain the bug:

In the past, we've encountered a few issues where our styles would show an empty

<table></table> after the form.

This has happened when updating to PHP8.*.

The reason is that the option $this->tableless is not given; thus the forms will get wrapped by a

. Due to this
having invalid html tags inside divs etc., the browser won't validate it correctly and moves the empty <table></table> block below: image

image

aschempp commented 1 year ago

thank you @zoglo