# Form on external site not able to manually update input values

**URL:** <https://community.hubspot.com/t/form-on-external-site-not-able-to-manually-update-input-values/79989>\
**Category:** Lead Capture Tools\
**Tags:** professional, enterprise\
**Created:** [April 25, 2023, 10:58am UTC](https://community.hubspot.com/t/form-on-external-site-not-able-to-manually-update-input-values/79989 "2023-04-25T10:58:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PCurtis](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@PCurtis](https://community.hubspot.com/u/PCurtis)\
**Post date:** [April 25, 2023, 10:58am UTC](https://community.hubspot.com/t/form-on-external-site-not-able-to-manually-update-input-values/79989/1 "2023-04-25T10:58:01Z")

</div>

Hi,

Using a form embedded in an external HTML page. I need to copy a form value from one element to another and i am using the events for onFormReady. Example code below. If i step through the form then it works but after onFormReady finishes the value defaults back to being blank. I understand the .change() is suppose to update this but no luck for me.

(The email is being copied to a custom object)

Any ideas?

Kindest  
Paul

hbspt.forms.create({

region: “na1”,

portalId: “XXX”,

formId: “XXX”,

onFormReady: function($form) {

var em = $(‘input[name=“email”]’).val();

$(‘input[name=“2-13702406/email\_address”]’).val(em).change();

}

});

---

<div class="post-metadata">

**Author:** ![TomM2](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tomm2/32/70887_2.png) [@TomM2](https://community.hubspot.com/u/TomM2)\
**Post date:** [April 25, 2023, 11:53am UTC](https://community.hubspot.com/t/form-on-external-site-not-able-to-manually-update-input-values/79989/2 "2023-04-25T11:53:59Z")

</div>

Hey @PCurtis my JS is a bit rusty these days, but just speculating, could this update to blank be caused by the email validation script on the email field? I know HS forms triggers the validation on the email field as the user is typing in it so I wonder if that’s causing a conflict with your script pulling the value.  
Out of curiosity, would “onFormSubmit” work for this usecase? Might help avoid any conflicts as the form is updating.

---

<div class="post-metadata">

**Author:** ![PCurtis](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@PCurtis](https://community.hubspot.com/u/PCurtis)\
**Post date:** [April 25, 2023, 2:30pm UTC](https://community.hubspot.com/t/form-on-external-site-not-able-to-manually-update-input-values/79989/3 "2023-04-25T14:30:19Z")

</div>

Yes, i think the onFormSubmit is a better event. The FormReady i think may fire before something which updates the form…  
Going to mark this as the solution
