Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

255
Views
Insert a hidden field into form using JS

I am trying to create and populate a hidden field on the form using google tag manager and JS.

It worked fine on one group of forms enter image description here

However, it doesn't work on this one. enter image description here

What do I need to modify to insert the hidden field on 2 nd form (besides the obvious "append to the element" part? Thank you!

Here is the script:

  
  var input = document.createElement("input");

input.setAttribute("type", "hidden");

input.setAttribute("name", "GAIDinserttest");

input.setAttribute("value", "{{extract GAID-GA Client ID}}");

//append to form element  .
document.getElementById("gform_page_2_1").appendChild(input);
  
  
</script>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!