I have some code that works fine to enter data via Excel/VBA into webforms.
I have it working on other sites, but on this one site, the data is "entered" into the text box, as I can see it on screen.
But if I then click on the text box the data disappears. Likewise, if I click submit on the form, I get an error saying the text boxes are empty (even though, on screen, they are not).
As I say, the code I have works on other sites so it must be something about the site I am using.
FYI here's simplified code I am using, where IE is an Internet Explorer object:
IE.document.all("EntryField_hdn_547").Value = "My Name"
This is the URL of the form: https://public-online.hmrc.gov.uk/lc/content/xfaforms/profiles/forms.html?contentRoot=repository:///Applications/NICs_iForms/1.0/CA3822&template=CA3822.xdp
(you'll need to click through to the 3rd page, and click the "Employer" radio to see the text fields)
And this is the HTML of eg the above text entry box:
<input type="text" class="i" name="EntryField_hdn_547" tabindex="1469" aria-label="Name" style="text-align: left; vertical-align: middle; text-indent: 0px; padding: 0px 5.67px; height: 34.0157px; box-sizing: border-box; position: absolute; width: 566.93px;">
Can anyone help suggest a way to get the data to "stick" in the text boxes
(FYI I also have code to click the radio buttons, and that works fine)
Also, I tried this answer which seems very similar but still no joy: Text entered into Webpage Search Box via Excel VBA is not detected when clicking Search button