Hiding the "Submit a Request button" until signed in

Answered


Posted Aug 10, 2021

Hi everyone,

 

I've had a look through the forums and posts but can't find an answer to my scenario, so thought I'd ask it.

 

In our help center, we have the "Submit a Request" option as a button, rather than plain text in the header. Before changing themes, the previous setup had the "Submit a request" link hidden until the user signed in. However, our previous HC did not have the "submit" set as a button.

I've tried wrapping the button with the {{#if signed_in}} code, but it doesn't seem to make any difference.

 

My current code looks like this:

{{! Submit a request }}
<a href="/hc/requests/new" class="btn btn--md btn--primary is-hidden--md-down header__request-right">
{{t 'submit_a_request'}}
</a>

What would I need to do to either:
1. Hide this button until you were signed in, or
2. Make the user have to sign in when clicking this button

Many thanks for any help or advice you can offer here.


1

23

0 comments

Sign in to leave a comment.

Didn't find what you're looking for?

New post