Second set of eyes, please!
In an Order form, I have this code which works except populating the First Name field on the form:
<script>
searchParams = new URLSearchParams(window.location.search)
pt_first = searchParams.get('first')
window.alert("first =" + pt_first)
document.getElementById('firstName').value = pt_first
window.alert("Done!")
</script>
When the page loads, a simple dialog indicates I have the correct value. However, the population of the name field does not work, and I do not get the final “Done” dialog (indicating that set the value probably died a horrible death.
This seems trivial. Please let me know what I am doing wrong. Thanks!