# Can't seem to hide username / password fields with Conditional Logic

**URL:** <https://community.gravityforms.com/t/cant-seem-to-hide-username-password-fields-with-conditional-logic/16055>\
**Category:** Get Help\
**Tags:** conditional-logic, user-registration\
**Created:** [October 18, 2023, 4:39am UTC](https://community.gravityforms.com/t/cant-seem-to-hide-username-password-fields-with-conditional-logic/16055 "2023-10-18T04:39:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![muzicman82](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/muzicman82/32/112_2.png) [@muzicman82](https://community.gravityforms.com/u/muzicman82)\
**Post date:** [October 18, 2023, 4:39am UTC](https://community.gravityforms.com/t/cant-seem-to-hide-username-password-fields-with-conditional-logic/16055/1 "2023-10-18T04:39:43Z")

</div>

I have the User Registration add-on with a create user stream working fine.

I want to display the username and password fields only if the user is not logged in, so they can enter their new desired username and password. If they are logged in, the form should just hide those fields and continue.

I have a hidden field with the default value set to `{user:user_login}`. I set conditional logic to show/hide some generic HTML if the user\_login value is empty (not logged in)… so I know that works.

If I apply the same logic to the username and password fields, it never works. I tried to “show if {user:user\_login} is blank” or “hide if {user:user\_login} is not blank” and either works. I was previously able to hide username and password fields based on a Yes / No radio circle choice, but we’ve removed that field…

We were previously asking if the visitor would like to create an account. Now, we want to require an account. I have a link to the login page if the user is not logged in… I guess another question would be… How can I put a small login form inline in the form so users can login without leaving the page?

How else can I approach this, without purchasing any 3rd party plugins?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [November 17, 2023, 4:40am UTC](https://community.gravityforms.com/t/cant-seem-to-hide-username-password-fields-with-conditional-logic/16055/2 "2023-11-17T04:40:08Z")

</div>

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