because the nature of vex.open() is to clone content passed in unsafeContent, one cannot use content placed in DOM by template engines. an option for remove+restore original would be one way to fix it
in this (pseudo-code) example <label> elements does not work:
<html><body>
<div class="hidden-form-html" style="display:none;">
<form>
<input id="unique-input-id"/ type="checkbox" name="confirmed" value="1">
<label for="unique-input-id">Click here to confirm</label>
</form>
</div>
</body></html>
<script>
var html = $('.hidden-form-html').html();
// Open form in a popup
vex.open({
unsafeContent: html,
afterOpen: function() {
initForm(this.contentEl);
}
});
var initForm = function(formWrapper) {
// code for form validation + submit here
}
</script>
because the nature of vex.open() is to clone content passed in unsafeContent, one cannot use content placed in DOM by template engines. an option for remove+restore original would be one way to fix it
in this (pseudo-code) example
<label>
elements does not work: