VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: dnlvsci on August 13, 2019, 17:08:46 PM

Title: Keeping registration fields value on unsuccessful registration
Post by: dnlvsci on August 13, 2019, 17:08:46 PM
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
Title: Re: Keeping registration fields value on unsuccessful registration
Post by: StefanSTS 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
Title: Re: Keeping registration fields value on unsuccessful registration
Post by: dnlvsci 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)...
Title: Re: Keeping registration fields value on unsuccessful registration
Post by: StefanSTS 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
Title: Re: Keeping registration fields value on unsuccessful registration
Post by: Milbo 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.
Title: Re: Keeping registration fields value on unsuccessful registration
Post by: Milbo on August 14, 2019, 11:27:46 AM
I just tested it on the last dev version and it works as expected
Title: Re: Keeping registration fields value on unsuccessful registration
Post by: dnlvsci on August 14, 2019, 16:53:22 PM
Quote from: Milbo on August 14, 2019, 11:27:46 AM
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)