Here is the following code;
<div class="col-xs-12 col-sm-9">
<input id="Shipping_FirstName" name="firstname" ng-model="userOrder.Shipping.FirstName" type="text" class="form-control nsg-form--input ng-pristine ng-untouched ng-invalid ng-invalid-required ng-valid-maxlength" ng-class="{'is-invalid': shipping_subform.$submitted && shipping_subform.firstname.$invalid}" required="" maxlength="35" tooltip="Please enter your first name" tooltip-toggle="shipping_subform.$submitted===true && shipping_subform.firstname.$invalid===true" esw-google-analytics-blur=""> <!-- ngIf: shipping_subform.$submitted && shipping_subform.firstname.$invalid -->
</div>
I have tried the following which writes the text to the input field;
document.getElementById("Shipping_FirstName").value = "test"
document.querySelector("input[id='Shipping_FirstName']").value = "test";
However, when I press the submit button, it says "Please enter your first name" as if the code above actually didn't write the text.
How can I fix this?
Thanks for any help, it's all appreciated.