We are having some of our coding not transfer when we test a form and it is causing an error when people try to submit forms.
Here is the coding that we are using
$(document).ready(function () {
$('.UserNo input').on('change', function () {
setTimeout(function() {
$('.RestrictedList textarea').val('');
$("select#q55").each(function() {
var str0 = $(this).html().replace(/\<option\>\<\/option\>/g, '');
var str1 = str0.replace(/\<option\>/g, '');
var str15 = str1.replace(/\<option selected=\"selected\"\>/g, '');
var str2 = str15.replace(/\<\/option\>/g, '\n');
$('.RestrictedList textarea').val($('.RestrictedList textarea').val() + str2);
});
}, 100);
});
});
For some reason this line of code doesn't show up when you view source on the form that was submitted.
var str2 = str15.replace(/\<\/option\>/g, '\n');
Is ther eany reason that would not be showing up?
Here is an image of the view source after the form is submitted.
//$('.Field3').on('change', function () {
setTimeout(function() {
$('.accounts textarea').val('');
$("Select#Field55").each(function() {
var str0 = $(this).html().replace(/\<option\>\<\/option\>/g, '');
var str1 = str0.replace(/\<option\>/g, '');
var str2 = str1.replace(/\<\/option\>/g, '\n');
$('.accounts textarea').val($('.accounts textarea').val() + str2);
});
}, 2000);
// });