HubSpot form not rendering properly in IE 11

Highlighted
Community Manager

Hello friends. 

I have a form that does not want to play nice with IE.  i have an onFormReady parameter set for the form which is used to append a select and style the form.  Does anyone see anything in this code that would prevent it from working in IE?  works in all other browsers.  here is the page where the form lives

 

  	<!--[if lte IE 8]>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>
<![endif]-->
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
  hbspt.forms.create({
	portalId: "1747091",
	formId: "214e5ee1-94dd-4e2e-a448-8442bbb5e69f",
  onFormReady($form, ctx){
   		$("#position").appendTo(".form-columns-1");
		  $("#position").bind("change keyup", function(event){
	  	var positionValue = $("#position option:selected").val();
		  $('input[name=bdm_position]').val(positionValue).change(); 
  		});    
		  $('.hs_submit_resume input[type="file"]').change(function(e){
				var resumeName = e.target.files[0].name;
				alert('The file "' + resumeName +  '" has been selected.');
		    $('.hs_submit_resume label').attr('data-content', resumeName);
			});
    	$('.hs_submit_cover_letter input[type="file"]').change(function(e){
				var fileName = e.target.files[0].name;
				alert('The file "' + fileName +  '" has been selected.');
		    $('.hs_submit_cover_letter label').attr('data-content', fileName);
			});
		}  
	});
</script>

 

Thanks,

Dennis


We are excited to announce that the Community will be launching a weekly newsletter on November 2, 2020!
Sign up today!
Reply
0 Upvotes
2 Replies 2
Highlighted
Top Advisor | Platinum Partner

@dennisedson - I am noticing that you aren't referring to your form fields in the scope of the $form in your callback function. 'name="bdm_postion"' instead of 'name=bdm_position'. IE sometimes gets funny about little stuff like that.

 

$form.find('input[name="bdm_position"]').val(positionValue).change();
Reply
0 Upvotes
Highlighted
Community Manager

@tjoyce, that did not work. 

I removed the script and replaced with a simple alert and the form still did not appear in IE.  The alert did pop up other browsers

Thanks,

Dennis


We are excited to announce that the Community will be launching a weekly newsletter on November 2, 2020!
Sign up today!
Reply
0 Upvotes