Shopify themes, liquid, logos, and UX
Dear all,
I am working on my own shopify store, i which i have Login form and Create account form in same page.(Side by side).
When i give correct/proper user name and password, i am able to login and create new account. But if i enter wrong password or user name in login form, the error message is displaying in both the forms as shown in image.
Please guide me, how to stop this and i should get error message only for respective form.
My store URL as follows:
https://famzon-development.myshopify.com/account/login
Please help me.!
Regards,
Pon maheswaran K
Solved! Go to the solution
This is an accepted solution.
please update this code error code like
{% unless template.name == 'register' %} {{ form.errors | default_errors }} {% endunless %} {% unless template.name == 'login' %} {{ form.errors | default_errors }} {% endunless %}
This is an accepted solution.
Hi Pon,
I adjusted the code accordingly as follows:
{% form 'customer_login' %} {% unless template.name == 'register' %} {{ form.errors | default_errors }} {% endunless %} [...] {% endform %}
and
{% form 'create_customer' %} {% unless template.name == 'login' %} {{ form.errors | default_errors }} {% endunless %} [...] {% endform %}
Let me know if that helps.
Best
Hello @shopify Gurus,
I am requesting you to show or provide me the documents/API/Methods regarding handling multiple forms and their errors in same page.
Please do the support for your user.
Regards,
Pon maheswaran K
Hi Pon, I'm experiencing the same issue. How were you able to resolve this? Thanks in advance.
This is an accepted solution.
please update this code error code like
{% unless template.name == 'register' %} {{ form.errors | default_errors }} {% endunless %} {% unless template.name == 'login' %} {{ form.errors | default_errors }} {% endunless %}
Thanks
Hello @IttantaTech, would you be able to help with a similar problem?
My footer newsletter signup is directly below my contact page. When I input an invalid email address for either one of them, the error message shows up for both. How do I get it to show up only for the part of the page I'm inputting an invalid email into?
I'm using the Debut theme and I'm still on the free trial.
Thanks so much!
Yes, can you please try some way
Hello, sorry I'm not sure I understand what you mean by please try some way. I'm not a developer and I don't know code. Would you be able to help me solve my problem?
Thanks again!
Please give your store access. to check this and provide solution. I have sent store access request from our Shopify Partner account.
Hello, I don't see your collaborator request in my dashboard. Did you maybe send an access request to the wrong shop? My shop is just-skin-co.myshopify.com.
The password to enter my store is fraily .
Do you have a solution for when multiple forms are within the same page template?
Dear @bbnnhhnn ,
we have fixed this issue partially by following method.
We have kept same copy of code i login.liquid and register.liquid.
In login.liquid file we removed the error handling for create_customer form and in register.liquid, removed error handling for customer_login form.
Because of this if any error happened in login form, will not reflect in register form and same vice versa.
And please confirm, where(In which file) did you paste the code given by @IttantaTech ?
Thanks in advance.
Regards,
Pon maheswaran K
This is an accepted solution.
Hi Pon,
I adjusted the code accordingly as follows:
{% form 'customer_login' %} {% unless template.name == 'register' %} {{ form.errors | default_errors }} {% endunless %} [...] {% endform %}
and
{% form 'create_customer' %} {% unless template.name == 'login' %} {{ form.errors | default_errors }} {% endunless %} [...] {% endform %}
Let me know if that helps.
Best
Dear @bbnnhhnn ,
Thank you very much for your help.
It is working as expected.
I am accepting this as solution.
Regards,
Pon.
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024