@SempervivumAug 13.2020 — #Javascript in fetched content is always a potential reason for trouble. If you maintain the fetched content yourself I recommend to place the JS in your index.php and execute it in the callback of your fetch request.
@SempervivumAug 13.2020 — #I mean something like this: <i> </i> // Place code into a function function doIt() { document.getElementById('id-of-your-form').addEventListener('submit', event => { // do anything you require }); } fetch('your-form.php').then(response => { return response.text(); }).then(response => { document.getElementById('your-container').innerHTML = response; // Execute function defined above doIt(); });
@EmirShah741Aug 13.2020 — #Please refer to the website [custom WordPress development services](https://maxenius.com/services/website-developement/wordpress/)