Is there a WordPress plugin or solution that allows to set up forms with a total control over markup

The tricky thing is that most form plugins are made specifically to control the HTML generation. So, it’s gonna be pretty rare to say, “have total control” over the output and also use a visual form builder.

That said, like was mentioned previously, Gravity Forms (and I’m sure others) have pretty extensive PHP APIs for extending the available form elements and behaviors. It can be pretty labor-intensive, and not always very clear from the docs how to do certain things, though.

One option you might want to look at is using a PHP form builder library. If you’re comfortable with having to build the forms as part of the development process (instead of having Dashboard users create them), then something like Formr may give you more of the control you’re looking for. I was able to get a fairly custom form up and running within an hour of starting the docs.

tech