# Auto-populate an email field in an OKTA SPA

**URL:** <https://devforum.okta.com/t/auto-populate-an-email-field-in-an-okta-spa/30157>\
**Category:** Questions\
**Created:** [August 22, 2024, 4:19am UTC](https://devforum.okta.com/t/auto-populate-an-email-field-in-an-okta-spa/30157 "2024-08-22T04:19:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhinash](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@abhinash](https://devforum.okta.com/u/abhinash)\
**Post date:** [August 22, 2024, 4:19am UTC](https://devforum.okta.com/t/auto-populate-an-email-field-in-an-okta-spa/30157/1 "2024-08-22T04:19:33Z")

</div>

Hi, I am trying to auto-populate an email field in an OKTA SPA using Jquery. Following code is auto populating the field, but I am getting error “This field cannot be left blank” on submit. Please help

$(‘input[name=“identifier”]’).val(“[abc.gmail.com](http://abc.gmail.com)”);  
$(‘input[name=“identifier”]’).attr(‘value’, “[abc.gmail.com](http://abc.gmail.com)”);  
$(‘input[name=“identifier”]’).trigger(“change”);

---

<div class="post-metadata">

**Author:** ![nikitag](https://avatars.discourse-cdn.com/v4/letter/n/ce7236/32.png) [@nikitag](https://devforum.okta.com/u/nikitag)\
**Post date:** [August 22, 2024, 9:14am UTC](https://devforum.okta.com/t/auto-populate-an-email-field-in-an-okta-spa/30157/2 "2024-08-22T09:14:42Z")

</div>

Hi @abhinash

Where are you seeing this message and where is this customisation created i.e. within Okta product, on your side?

Is this a Prod Okta org OR dev Okta org OR a trial Okta org you are using?

I would recommend opening a support case with our team, as we can then assist you better.

---

<div class="post-metadata">

**Author:** ![abhinash](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@abhinash](https://devforum.okta.com/u/abhinash)\
**Post date:** [August 22, 2024, 3:57pm UTC](https://devforum.okta.com/t/auto-populate-an-email-field-in-an-okta-spa/30157/3 "2024-08-22T15:57:28Z")

</div>

We haven’t customized the OKTA widget. We are try to auto populate the email id in email field when user clicks forgot password link.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [September 21, 2024, 3:58pm UTC](https://devforum.okta.com/t/auto-populate-an-email-field-in-an-okta-spa/30157/4 "2024-09-21T15:58:07Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
