Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6192967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:02:13+00:00 2026-05-24T03:02:13+00:00

I have a page which has a form in it from hubspot. I am

  • 0

I have a page which has a form in it from hubspot.

I am not able to input a text in a text input field using javascript…

Please help I dont know the reason why..

<form action="http://www.xyz.com/Default.aspx?app=iframeform&hidemenu=true&ContactFormID=45875" method="post">
<input type="hidden" name="FormSubmitRedirectURL" id="FormSubmitRedirectURL" value="www.xyz.com/test" >
<input type="hidden" name="Lead_Src" id="LeadSrc" value="test form 1" />


 <script type='text/javascript' language='javascript'>/* <![CDATA[ */
HubSpotFormSpamCheck_LeadGen_ContactForm_45875_m0 = function() {
   var key = document.getElementById('LeadGen_ContactForm_45875_m0spam_check_key').value;
   var sig = '';
   for (var x = 0; x< key.length; x++ ) {
            sig += key.charCodeAt(x)+13;
   }
   document.getElementById('LeadGen_ContactForm_45875_m0spam_check_sig').value = sig; 
   /* Set the hidden field to contain the user token */
   var results = document.cookie.match ( '(^|;) ?hubspotutk=([^;]*)(;|$)' );
    if (results && results[2]) {
        document.getElementById('LeadGen_ContactForm_45875_m0submitter_user_token').value =  results[2];
    } else if (window['hsut']) {
           document.getElementById('LeadGen_ContactForm_45875_m0submitter_user_token').value = window['hsut'];
    }
    return true;
  };
 /*]]>*/</script>



 <script type="text/javascript">// <![CDATA[


    document.getElementById('LeadGen_ContactForm_45875_m0_FirstName').value='test';


   // ]]></script>

<input type='hidden' id='LeadGen_ContactForm_45875_m0submitter_user_token'  name='LeadGen_ContactForm_45875_m0submitter_user_token'  value='' /><input type='hidden'  name='ContactFormId'  value='45875' /><input type='hidden'  id='LeadGen_ContactForm_45875_m0spam_check_key'  name='LeadGen_ContactForm_45875_m0spam_check_key'   value='snopseihlijderqjslqlrsqodlghlksnmpikgsphnegufklwnwtdsfeeegkr' /><input type='hidden'  id='LeadGen_ContactForm_45875_m0spam_check_sig'  name='LeadGen_ContactForm_45875_m0spam_check_sig'  value='' /><div class='ContactFormItems  FormClassID_45875'><table border="0" cellspacing="0" cellpadding="5">
  <tr><td>&nbsp;</td><td>First Name</td></tr>
 <tr><td>&nbsp;</td><td><input type="Text"  name="LeadGen_ContactForm_45875_m0:FirstName" class="StandardI AutoFormInput  LeadGen_ContactForm_45875_m0_AutoForm" id="LeadGen_ContactForm_45875_m0_FirstName" value=""  /><div class="fieldclear"></div></td></tr>
  <tr><td>&nbsp;</td><td>Last Name</td></tr>
  <tr><td>&nbsp;</td><td><input type="Text"  name="LeadGen_ContactForm_45875_m0:LastName" class="StandardI AutoFormInput  LeadGen_ContactForm_45875_m0_AutoForm" id="LeadGen_ContactForm_45875_m0_LastName" value=""  /><div class="fieldclear"></div></td></tr>
   <tr><td>&nbsp;</td><td>Email (we will keep your email completely private)</td></tr>
   <tr><td>&nbsp;</td><td><input type="Text" name="LeadGen_ContactForm_45875_m0:Email" class="StandardI AutoFormInput LeadGen_ContactForm_45875_m0_AutoForm" id="LeadGen_ContactForm_45875_m0_Email" value="" /><div class="fieldclear"></div></td></tr>
 <tr><td>&nbsp;</td><td>Message</td></tr>
 <tr><td>&nbsp;</td><td><textarea type="Text" name="LeadGen_ContactForm_45875_m0:Message" class="StandardI AutoFormInput LeadGen_ContactForm_45875_m0_AutoForm" id="LeadGen_ContactForm_45875_m0_Message"  >  </textarea><div class='fieldclear'></div></td></tr>

The test value is not being displayed..

the only way to put the javascript is in the head tags… and i get this message

Uncaught TypeError: Cannot set property ‘value’ of null

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T03:02:14+00:00Added an answer on May 24, 2026 at 3:02 am

    You have an extra } in the second javascript tag.

     <script type="text/javascript">// <![CDATA[
    
    
        document.getElementById('LeadGen_ContactForm_45875_m0_FirstName').value='test';
    
       }  // <--- this one!!
       // ]]></script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form which has three inputs when the page loads -- 2
I have a html page with a form. The form has Div which gets
I have a web page which has a form at the top and a
I have a page of the format www.test.com/policy-info/ which has a form that takes
I have a javascript file linked to a PHP page which has a value
I have a master page which has a <form runat=server> line and a ContentPlaceHolder
I have a parent page which has an iframe and also has javascript which
I have a parent page which has a drop down list in it. using
I have a page which has an iFrame loading a credit card payment form
I have some jQuery listeners setup which listen for form input on a type=text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.