Situation with HTML
<div id="form-lightbox">
<div class="form">
<div id="ajaxreplace">
<script type="text/javascript">
jQuery(function() {
jQuery.ajaxReplace({
//parameters
});
});
</script>
</div>
</div>
</div>
<a href="#form-lightbox">open lightbox</a>
Exploring a custom script that replaces the form from the backend.
The issue here is that featherlight.js duplicates the source and displays it in the lightbox, causing problems for handling forms.
To address this, I modified the script tag type to "text/x-template" to prevent direct execution. However, this prevented the form from being rendered in the lightbox.
Query: Is there a way to utilize featherlight to execute the script when loading the lightbox?