# Conditional text on universal reset password prompt?

**URL:** <https://community.auth0.com/t/conditional-text-on-universal-reset-password-prompt/151728>\
**Category:** Get Help\
**Tags:** login-experience, new-universal-login-experience\
**Created:** [November 18, 2024, 12:58am UTC](https://community.auth0.com/t/conditional-text-on-universal-reset-password-prompt/151728 "2024-11-18T00:58:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdm](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kdm/32/8632_2.png) [@kdm](https://community.auth0.com/u/kdm)\
**Post date:** [November 18, 2024, 12:58am UTC](https://community.auth0.com/t/conditional-text-on-universal-reset-password-prompt/151728/1 "2024-11-18T00:58:37Z")

</div>

I’m following the guide to invite users to the application via password change ticket.

I’ve got custom domains set up, and now I’m trying to configure the reset-password prompt.

Using your Auth0 cli, I was able to load up the storybook editor tool to modify the reset-password template.

How can I conditionally render the text? I couldn’t figure it out and ended up doing this, which I don’t think is a good solution because I’m manually updating the text in the widget:

```auto
<!DOCTYPE html>
<html lang="{{locale}}">

<head>
    {%- auth0:head -%}
    <title>Welcome to {{ application.name }} </title>
</head>

<body class="_widget-auto-layout">
    {%- auth0:widget -%}
</body>

<script>
    function getQueryParameter(name) {
        const url = window.location.href;
        const params = new URLSearchParams(url.substring(url.indexOf('#') + 1));
        return params.get(name);
      }
 
      const isInvite = getQueryParameter('type') === 'invite';

      if (isInvite) { 
        document.title = 'Set Your Password';
        const header = document.querySelector('h1');
        if (header) {
          header.textContent = 'Set Your Password';
        }
        const description = document.querySelector('p');
        if (description) {
          description.textContent = 'Please set your password to activate your account.';
        }
      }
</script>

</html>

```

Is there some way to have the auth0:widget use the values I have based on the param type?

---

<div class="post-metadata">

**Author:** ![yarhugaab5](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yarhugaab5/32/61081_2.png) [@yarhugaab5](https://community.auth0.com/u/yarhugaab5)\
**Post date:** [November 18, 2024, 2:52pm UTC](https://community.auth0.com/t/conditional-text-on-universal-reset-password-prompt/151728/2 "2024-11-18T14:52:33Z")

</div>

I also face this issue. Please help me.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [November 19, 2024, 12:02am UTC](https://community.auth0.com/t/conditional-text-on-universal-reset-password-prompt/151728/4 "2024-11-19T00:02:48Z")

</div>

Hi @kdm,

I recommend referring to our [https://auth0.com/docs/customize/login-pages/universal-login/customize-templates#login-box-image-layout](https://auth0.com/docs/customize/login-pages/universal-login/customize-templates#login-box-image-layout) for an example on how to include conditionals in your Universal Login page templates.

Let me know if you have any questions.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![kdm](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kdm/32/8632_2.png) [@kdm](https://community.auth0.com/u/kdm)\
**Post date:** [November 20, 2024, 10:16pm UTC](https://community.auth0.com/t/conditional-text-on-universal-reset-password-prompt/151728/5 "2024-11-20T22:16:11Z")

</div>

Thanks, I know that, but it isn’t what I am asking about. Actually, I’m asking about the auth0\_widget itself.

What you linked me does not make any changes into the auth0\_widget, it just adjusts some styles. Here’s the example from docs:

```auto
 {% if prompt.name == "login" or prompt.name == "signup" %} 
        <div class="prompt-wrapper">
        {%- auth0:widget -%}
        </div>
    {% else %}
        {%- auth0:widget -%}
    {% endif %}

```

If I want to change the auth0 widget’s title text (“Reset. your password”) to (“Set your password”) based on a condition, how can I do that?

In my original code that I shared above, I updated these elements using querySelector because I couldn’t find an example of this in the docs.

Sorry for the confusion, please let me know if there is a way to do this.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [November 26, 2024, 12:05am UTC](https://community.auth0.com/t/conditional-text-on-universal-reset-password-prompt/151728/6 "2024-11-26T00:05:38Z")

</div>

Hi @kdm,

Thanks for the update and clarification.

To change the text for the specific Universal Login pages, you can follow our [Customize Universal Login Text Elements](https://auth0.com/docs/customize/login-pages/universal-login/customize-text-elements) documentation.

Specifically, you will want to change the **reset-password** prompt for each screen.

Note that you won’t be able to change the text dynamically. It will be static changes.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![ankur.garg](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ankur.garg/32/59865_2.png) [@ankur.garg](https://community.auth0.com/u/ankur.garg)\
**Post date:** [January 2, 2025, 3:37pm UTC](https://community.auth0.com/t/conditional-text-on-universal-reset-password-prompt/151728/7 "2025-01-02T15:37:39Z")

</div>

This seems like customization is very limited here if we can’t change the text dynamically. The documentation specified is very misleading in that case. Auth0 docs clearly specify that we can customize the Universal page based on `type=invite`. We should be able to customize the page on conditional logic especially when we could have done with Classic Login Pages. We can’t use that as our company has use cases for organizations so we have to stick with Universal Login. Organizations are bound to need customizations based on conditions.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 1, 2025, 4:23am UTC](https://community.auth0.com/t/conditional-text-on-universal-reset-password-prompt/151728/8 "2025-02-01T04:23:09Z")

</div>

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