Author Topic: Keeping registration fields value on unsuccessful registration  (Read 476 times)

dnlvsci

  • Beginner
  • *
  • Posts: 49
Is there a way to keep registration fields content under the registration when something failed on registration process? It is annoying when user name is already used,  or 2nd password not matching, the registration page reload and all fields are empty, so you need to start over the whole form filling from the beginning and not just fix the incorrect filed. The normal joomla registration store the fields value in the session/state...

I tested on J3.9.10 and VM 3.5

Thank you

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 520
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: Keeping registration fields value on unsuccessful registration
« Reply #1 on: August 13, 2019, 17:35:53 pm »
One reason I use Virtueplanets One Page Checkout.
A good template should do that too. The more of these things in the core, the more can interfere with templates, so I am quite happy, VM is doing nothing in that area.

Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

dnlvsci

  • Beginner
  • *
  • Posts: 49
Re: Keeping registration fields value on unsuccessful registration
« Reply #2 on: August 13, 2019, 22:12:41 pm »
Yes that working in the cart, but not on normal registration process (from login module, joomla registration redirect etc)...

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 520
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: Keeping registration fields value on unsuccessful registration
« Reply #3 on: August 13, 2019, 23:14:28 pm »
You should block the "normal" registration process and the joomla registration redirect for guest users.

Just let them register via cart. Keeps a lot of spamers out too.
One simple way for your users, not different path ways. Once they are registered and want to change their address, give access to the edit address layout.

Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9997
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Keeping registration fields value on unsuccessful registration
« Reply #4 on: August 14, 2019, 11:26:20 am »
I wonder, because the fields should be stored in the cart object and therefore reloaded. But as stefan said, it is not done per js or so.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9997
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Keeping registration fields value on unsuccessful registration
« Reply #5 on: August 14, 2019, 11:27:46 am »
I just tested it on the last dev version and it works as expected
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

dnlvsci

  • Beginner
  • *
  • Posts: 49
Re: Keeping registration fields value on unsuccessful registration
« Reply #6 on: August 14, 2019, 16:53:22 pm »
I just tested it on the last dev version and it works as expected

Indeed. Working well if you registering through cart, but not when you try to register xxxx.tld/index.php?option=com_virtuemart&view=user (joomla registration redirected url) When some data failing, you will be redirecting to xxx.tld/index.php?option=com_virtuemart&view=user&layout=edit  BUT not the url mismatch cause the problem (i tried to register throught xxx.tld/index.php?option=com_virtuemart&view=user&layout=edit in this case the url/redirect url doesn't changed, but fields are empty too after redirecting)