I have a hidden field that is pre-filled on lookup, the change triggers the input to go into a placeholder in a Custom HTML. On the form everything works great, but on submit the change is not saved and it defaults back to the original placeholder value.
I tried this:
//When the Field 20 receives input, it will replace the HTML placeholder $("#q20 input").change(function(){ //when Instance ID is changed var spanC = document.getElementById('Course'); var course = document.getElementById('Field20').value; while( spanC.firstChild ) { spanC.removeChild( spanC.firstChild ); } spanC.appendChild( document.createTextNode(course) ); });
And this:
//When the Field 20 receives input, it will replace the HTML placeholder $("#q20 input").change(function(){ //when Instance ID is changed var value = document.getElementById('Field20').value; //this is the Course field document.getElementById('Course').innerHTML=Field20.value; });
Both work within the form but default back on Submit. (Forms 10.3.1)