- Posts: 272
- Thank you received: 13
Mandatory field with view limited by other field
- deltafidesign
-
Topic Author
- Offline
-- Joomla version -- : 3.1.5
-- PHP version -- : 5.1
I have created a mandarory field. View for this field is limited by user country field. So if user is in Italy, this field must be shoun otherway not.
Anyway if a user from France for example try to register, the field is correctly hidden, but user cannot complete registration because an error message shows that user should fill that field that anyway is hidden.
Any solution?
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Can you give us more details about the problem that you are having through some screenshots and a link of the page where you are having this issue.
Thanks
Please Log in or Create an account to join the conversation.
- deltafidesign
-
Topic Author
- Offline
- Posts: 272
- Thank you received: 13
If a user from UK, for example, try to register, this field is hidden but being mandatory, when user click on register button it displays an error message that asks to fill this field but a user from UK cannot see that field because it's hidden. Take a look at second attached image where you can see the form. The mandatory field is not shown (correctly) but user cannot fill it and system says that it's required.
So, is that a bug about the condition or just need to set something to let it work fine?
Please Log in or Create an account to join the conversation.
Please change the line:
$fields =& $this->getData($area, $type, false, $allCat);
to:
$fields =& $this->getData($area, $type, true, $allCat);
in the file administrator/components/com_hikashop/classes/fields.php and that should fix the problem.
Please Log in or Create an account to join the conversation.
- deltafidesign
-
Topic Author
- Offline
- Posts: 272
- Thank you received: 13
Please Log in or Create an account to join the conversation.
This fix works on our end so it should on yours.
How did you make the modification? Could you make sure the line has been changed?
We may need a FTP access if it really doesn't work.
Please Log in or Create an account to join the conversation.
- deltafidesign
-
Topic Author
- Offline
- Posts: 272
- Thank you received: 13
Please Log in or Create an account to join the conversation.
You should try again and tell us if it works.
Please Log in or Create an account to join the conversation.
- deltafidesign
-
Topic Author
- Offline
- Posts: 272
- Thank you received: 13
Please Log in or Create an account to join the conversation.
$fields =& $this->getData($area, $type, true, $allCat);
to:
$fields =& $this->getData($area, $type, false, $allCat);
in the file administrator/components/com_hikashop/classes/fields.php which was the modification I had made on my end.
I did a test and it's working fine now on your website.
Please Log in or Create an account to join the conversation.
- deltafidesign
-
Topic Author
- Offline
- Posts: 272
- Thank you received: 13
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- deltafidesign
-
Topic Author
- Offline
- Posts: 272
- Thank you received: 13
What's wrong?
Please Log in or Create an account to join the conversation.
I fixed the current HikaMarket build (1.3.0) in order to some improvements about the linked custom fields.
I also made several patchs in the HikaShop class fields, patch which will be include in the next HikaShop release (2.2.1).
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.