Registration form not empty after registration

  • Posts: 42
  • Thank you received: 0
  • Hikashop Business
3 years 1 week ago #331640

-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.25
-- PHP version -- : 7.4.16

Hi Hika,

I have a menu-item to the HIkashop registration form. When some one registers and goed back to the registration form the form is filled with previous information. How can I clear this information?

We use this form to let multiple people register a day from the same device so we need a clear form for every new customer.

Hope you can help.

With kind regards,
Rachel

Please Log in or Create an account to join the conversation.

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
3 years 1 week ago #331641

Hi,

The information filled in the form is stored in the user session before the registration process starts so that if something goes wrong (if a required field is not filled, etc), the system can redisplay the form with the information that had been filled in already filled.

Also, after the registration, the user should see an empty page with the success message. That page is displayed by the view file user / after_register.php

So what you can do is edit that view file via the Display>Views menu (you'll see it's almost empty by default) and add such code:

<?php
unset($_SESSION['hikashop_user_data']);
unset($_SESSION['hikashop_address_data']);
unset($_SESSION['hikashop_billing_address_data']);
?>
That will clear the data of the form for the user session.
Note that if you have the user account activation activated (with the link to link in an email to activate the user account after the registration), you'll want to add that code to user / activate.php too.

Note that browsers can also store form data so that the user can easily reuse it later on or even auto fill the form for him:
support.iclasspro.com/hc/en-us/articles/...omplete-Information-

Please Log in or Create an account to join the conversation.

Time to create page: 0.056 seconds
Powered by Kunena Forum