- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2018
03:12 AM
08-22-2018
03:12 AM
Creating a Log In form on homepage
Hello,
I am trying to create a log in form in the hero section of the header on my Magento website.
I have managed to display the form, however when the user clicks "Login", it redirects them to the login page where they will have to re-enter their username and password, rather than actually logging them in to the store.
The HTML I entered in the "Content" section of the page in CMS > Pages is:
<div class="block block-login"><form action="https://cashino.kellyseye.com/customer/account/loginPost/" method="post"> <div class="block-content"><input id="mini-login" class="input-text" spellcheck="false" type="email" placeholder="Email:" name="login[username]" /> <input class="input-text" type="password" placeholder="Password:" name="login[password] id=" /> <input type="hidden" value="ju8X3z6YM43Vd01k" name="form_key" /> <div class="actions"><button class="button" type="submit"> <span> <span>Login</span> </span> </button></div> </div> </form></div>
Please advise me what is missing?
Labels:
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2018
06:07 AM
08-22-2018
06:07 AM
Re: Creating a Log In form on homepage
Hello @jordan_cardwell
you can not put form key same for all users
<?php echo $this->getBlockHtml('formkey')?>
you need to add form key using above url
Hope it will help you.
Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer