Jump to content

Adding custom password field

Recommended Posts

Site URL: https://www.john-crump.com

Is it possible to create a custom password field that when filled in, it will redirect the user to another page? Basically I have a 2 index website and when a user clicks on a particular thumbnail on my homepage, I want the user to be taken directly to the password protected 2nd index. Currently I have an extra step because I can't get "URL redirect" to work with my template, so when the user clicks the thumbnail they are taken to a page where they have to click a link that takes them to the password protected index. I hope this makes sense! It seems like something that is possible with some custom CSS perhaps. Thank you

Link to comment
  • Replies 3
  • Views 280
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

So on my homepage, I want the Apple thumbnail to redirect to another index that is password protected.

Currently the flow is: click on Apple thumbnail > click on button that I created > enter password > 2nd index appears

The flow that i want is: click on Apple thumbnail > enter password > 2nd index appears

There's an extra step that is a bit of a disruption to the flow and simplicity of the site.

Thanks!

Edited by jcrump1101
Link to comment
On 6/17/2022 at 12:14 AM, jcrump1101 said:

So on my homepage, I want the Apple thumbnail to redirect to another index that is password protected.

Currently the flow is: click on Apple thumbnail > click on button that I created > enter password > 2nd index appears

The flow that i want is: click on Apple thumbnail > enter password > 2nd index appears

There's an extra step that is a bit of a disruption to the flow and simplicity of the site.

Thanks!

Add this code to Settings > Advanced > Cod Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() { 
		$('#grid .item a[href="/apple4"]').attr('href','https://google.com');
	});
</script>

Replace google with 2nd index page

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.