I am attempting to perform some field validation on a Landing Page using some javascript that I'm working on.
Long story short, I am confused as to where I need to inject the <script> tags as the documentation is kind of all over the place, both here in the community as well as this article everyone keeps posting: https://docs.microsoft.com/en-us/dynamics365/marketing/developer/marketing-form-client-side-extensibility
Can someone please instruct me clearly where to place the <script> tags so that they'll be called correctly when the form is submitted? Script below:
-------------
MsCrmMkt.MsCrmFormLoader.on('formSubmit', function(event) {
var firstName = document.getElementById('3f746946-34b4-442c-a677-e232cdd2bc40').value;
if (firstName.value.length >= 3) {
alert("First Name must contain 3 or more letters");
event.preventDefault();
});
--------------
Thanks in advance!