Need help to finish a Sketch With Web and MQTT

Hello , after spending a lot of time on this I have to concede defeat and ask for help.!

I build up a sketch that controls a couple of relays and has some inputs. I then added a web setup page, created by "JO3RI check http://www.jo3ri.be/arduino" and added some extra fields for the MQTT server.
All of that works quite well. I will admit that even though I have a fair idea as to how much of it works I am nowhere near good enough to create these things from scratch.

I want to add an extra field to my web interface where one could change the default mqtt topic of the sketch. Similar to what is done in the TASMOTA setup but on a much smaller scale.
The sketch is fairly big so I can add the code so I'll upload the ino file.
I am will to pay for the service.
Can anyone help?

Attached is the sketch - it works so if someone would like to use it.

Best regards
Paul

MQTT-Web-Relay.ino (31.3 KB)