[Skip to main content](#vessel-content)

#   Custom fields

##

- **[JIK](/forum/user/362-jik "View JIK's Profile")**
- [![JIK's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/362-jik "View JIK's Profile") Topic Author
- [ Offline](/forum/user/362-jik)

Less More

- Posts: 209
- Thank you received: 18
-
-

15 years 3 months ago [\#22070](#22070) by [JIK](/forum/user/362-jik "View JIK's Profile")  *[Custom fields](/forum/4-how-to/22070-custom-fields#22070 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")* was created by *[JIK](/forum/user/362-jik "View JIK's Profile")*

Hi,

I need to get more information from the customer depending on what product they are buying.

For example:

If they buy a product from Category A, I also need to know their birthdate
If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate

I have tried creating a custom "Category" field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.

After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.

Any help appreciated!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14279
-
-

15 years 3 months ago [\#22078](#22078) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22078 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

Hi,

Category custom fields are only to add information to categories. You won't be able to do what you want with them.

You should wait for next release (before the end of the week) as it includes new options for custom fields which will allow you to display them only for some categories. That way, you will be able to create custom fields of the table "item" and restrict them to category A or B.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")**
- [![MinnieMouse's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3535-minniemouse "View MinnieMouse's Profile")
- [ Offline](/forum/user/3535-minniemouse)

Less More

- Posts: 102
- Thank you received: 0
-
-

15 years 3 months ago [\#22478](#22478) by [MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")  Replied by *[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22478 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

I just purchased the business version today, but i think i need this feature. is this in the current release or still not out yet?

also, this is what i want to do with it, please tell me if its possible.

we have categories {cat, dog fish}
we do pick up in our store. you order a dog and pick it up (just an example). so if you order a dog you get one set of pick up dates. if you order a cat you get a different set of pick up dates. (so the dogs and cats dont fight) if you order a fish you can pick it up on default set of pick up dates.

is this possible with your new feature?

thanks, Liz

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14279
-
-

15 years 3 months ago [\#22479](#22479) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22479 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

It is out yes. You can now limit a custom field to only one group of products. That way you could ask a pickup date for each product with different values based on the type of product.

Note that you should create custom fields of the table "item" via the menu Display-&gt;Custom fields.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")**
- [![MinnieMouse's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3535-minniemouse "View MinnieMouse's Profile")
- [ Offline](/forum/user/3535-minniemouse)

Less More

- Posts: 102
- Thank you received: 0
-
-

15 years 3 months ago -  15 years 3 months ago [\#22481](#22481) by [MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")  Replied by *[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22481 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

okay so i was playing with that. but i really am selling food items not pets (pets made it easier to describe the issue, but i see now ... too simple). i made an item drop list with my dates... but that shows on every product. i want it to only display in the address / checkout portion of the shopping.
say you have

cat: dairy
cat: meat

prod: dairy: cheese
prod: dairy: cream

prod: meat: salami

i order one of each item of cheese and cream. i dont want to have to have the customer specify the pickup date on both those items but rather in the cart it sees that there is dairy in the cart and gives them the specific droplist associated with dairy category.

is that possible?

it looks like the field table i want is the "order" table. then i want to be able to say.. this field in the order table only displays if this category is displayed.

thanks for the help!

Last edit: 15 years 3 months ago by [MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile"). Reason: more info

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14279
-
-

15 years 3 months ago [\#22482](#22482) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22482 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

Well, fields of the order table are for the whole order, so there can't be any category restriction on them.
If you want a custom field for cheese and and another one for salami, what if you have both a salami and a cheese in the cart ? Should both be displayed ? Or none ? From what I understand you would like both.

But that kind of limitation is hard to do automatically. You'll have to customize the custom_fields file of the view checkout via the menu Display-&gt;Views in order to display or not the different custom fields based on the type of the product (You could create a custom field of the table "product" in order to select the type of the product for each of your products so that you could more easily loop through the products of the cart and display or not custom order fields). That will require some coding...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")**
- [![MinnieMouse's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3535-minniemouse "View MinnieMouse's Profile")
- [ Offline](/forum/user/3535-minniemouse)

Less More

- Posts: 102
- Thank you received: 0
-
-

15 years 3 months ago -  15 years 3 months ago [\#22484](#22484) by [MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")  Replied by *[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22484 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

hi nicolas, yes, i was trying to minimize the amount of "hacking" i needed to do by using whatever was built in first.

so the idea was one default table of dates that all can use. then if there are any special items in the cart this table of pick up dates overrides the default. i dont have to worry about two separate categories being ordered together because the dates are different enough over time. (hard to really explain). all i really need is one default set and one override set based on the category of items represented in the cart.

from what you are saying below i have a question..
you say "You'll have to customize the custom_fields file of the view checkout via the menu Display-&gt;Views in order to display or not the different custom fields based on the type of the product"
does this mean from that view i could not retrieve the category of the product and use that?

also, how do i access the cart values?
thanks, Liz

Last edit: 15 years 3 months ago by [MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14279
-
-

15 years 3 months ago [\#22485](#22485) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22485 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

The categories of the products are not loaded on the checkout as they are not used for anything. You would have to do the mysql query yourself and then based on the categories of the products, display one custom field or the other or something like that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")**
- [![MinnieMouse's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3535-minniemouse "View MinnieMouse's Profile")
- [ Offline](/forum/user/3535-minniemouse)

Less More

- Posts: 102
- Thank you received: 0
-
-

15 years 3 months ago [\#22487](#22487) by [MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")  Replied by *[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22487 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

also, how do i access the cart values?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14279
-
-

15 years 3 months ago [\#22489](#22489) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22489 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

Like that for example:

foreach($this-&gt;rows as $i =&gt; $row){
echo $row-&gt;product_id;
}

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")**
- [![MinnieMouse's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3535-minniemouse "View MinnieMouse's Profile")
- [ Offline](/forum/user/3535-minniemouse)

Less More

- Posts: 102
- Thank you received: 0
-
-

15 years 3 months ago [\#22490](#22490) by [MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")  Replied by *[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22490 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

thanks! wasnt sure this was available that easily. okay i am now going to see if i can get this to work. i will probably have more questions. LOL

Liz

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")**
- [![MinnieMouse's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3535-minniemouse "View MinnieMouse's Profile")
- [ Offline](/forum/user/3535-minniemouse)

Less More

- Posts: 102
- Thank you received: 0
-
-

15 years 3 months ago [\#22494](#22494) by [MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")  Replied by *[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22494 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

So i did this:

&lt;?php
foreach($this-&gt;rows as $i =&gt; $row){
echo $row-&gt;dates;

}
if (strstr($row-&gt;dates,'default')){
$type = $this-&gt;type;
foreach($this-&gt;extraFields[$type] as $fieldName =&gt; $oneExtraField) {
?&gt;
&lt;tr class="hikashop_checkout_&lt;?php echo $fieldName;?&gt;_line"&gt;
&lt;td class="key"&gt;
&lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($oneExtraField);?&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;?php

echo $this-&gt;fieldsClass-&gt;display($oneExtraField,$this-&gt;$type-&gt;$fieldName,'data');
?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;?php } ?&gt;
&lt;?php } ?&gt;

dates is my table field it has two values right now. one of which is default.
i have a product with a field defined with that value. and the echo spits out defaultdefault with two items in my cart which is correct. but for some reason... the if throws a negative.

any help would be appreciated!
thanks, Liz

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14279
-
-

15 years 3 months ago [\#22512](#22512) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22512 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

The code
if (strstr($row-&gt;dates,'default')){
is outside the foreach loop so that's normal it doesn't work.
you should rather do something like that:
$found = false;
foreach($this-&gt;rows as $i =&gt; $row){
if ($row-&gt;dates=='default') $found = true;
}

if($found){
...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")**
- [![MinnieMouse's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3535-minniemouse "View MinnieMouse's Profile")
- [ Offline](/forum/user/3535-minniemouse)

Less More

- Posts: 102
- Thank you received: 0
-
-

15 years 3 months ago [\#22515](#22515) by [MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")  Replied by *[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22515 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

thanks nicolas, i think i got it working.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")**
- [![MinnieMouse's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3535-minniemouse "View MinnieMouse's Profile")
- [ Offline](/forum/user/3535-minniemouse)

Less More

- Posts: 102
- Thank you received: 0
-
-

15 years 3 months ago [\#22517](#22517) by [MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")  Replied by *[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22517 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

now another question though. so i created a select list that is limited to one of the above lists. i assumed that meant that it would be an ajax list that would only show when a specific option on the other is selected. that is not working. do i misunderstand the use of the limit to... or is there something else i need to do to make it work.

thanks, Liz

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14279
-
-

15 years 3 months ago [\#22521](#22521) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22521 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

No you're correct. The custom field will be displayed or not automatically based on the other one value. If it doesn't work maybe it's because you updated from a previous version of HikaShop and you still have the javascript files cached by your browser. Or you have edited a view before updating and you don't have the new code necessary in the view to make it work. Or you have some javascript errors on your page.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")**
- [![MinnieMouse's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3535-minniemouse "View MinnieMouse's Profile")
- [ Offline](/forum/user/3535-minniemouse)

Less More

- Posts: 102
- Thank you received: 0
-
-

15 years 3 months ago [\#22555](#22555) by [MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")  Replied by *[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22555 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

i upgraded from installing a free version last week, i had not altered anything in the views. i will look for a javascript error. is hika running on jquery or mootools?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")**
- [![MinnieMouse's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3535-minniemouse "View MinnieMouse's Profile")
- [ Offline](/forum/user/3535-minniemouse)

Less More

- Posts: 102
- Thank you received: 0
-
-

15 years 3 months ago [\#22565](#22565) by [MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")  Replied by *[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22565 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

which version of mootools should i be using 1.1 or 1.2 upgrade? no javascript errors apparent using firebug. my view is just altered to show or not show a date list based on product type in the cart but the loop of custom fields is intact with the html intact...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")**
- [![MinnieMouse's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3535-minniemouse "View MinnieMouse's Profile")
- [ Offline](/forum/user/3535-minniemouse)

Less More

- Posts: 102
- Thank you received: 0
-
-

15 years 3 months ago -  15 years 3 months ago [\#22566](#22566) by [MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")  Replied by *[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22566 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

okay so looking at your hikashop.js you are calling a noconflict jquery ... there is no jquery loaded in my site. SHOULD THERE BE?
thanks!
liz

[edit] upon further examination... i think you are checking for jquery and providing a no conflict mode if it exists for some other reason on the site...

Last edit: 15 years 3 months ago by [MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")**
- [![MinnieMouse's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3535-minniemouse "View MinnieMouse's Profile")
- [ Offline](/forum/user/3535-minniemouse)

Less More

- Posts: 102
- Thank you received: 0
-
-

15 years 3 months ago -  15 years 3 months ago [\#22568](#22568) by [MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")  Replied by *[MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile")* on topic *[Re: Custom fields](/forum/4-how-to/22070-custom-fields#22568 "Hi,  I need to get more information from the customer depending on what product they are buying.  For example:  If they buy a product from Category A, I also need to know their birthdate If they buy a product from Category B, I also need to know their drivers licence number but not their birthdate  I have tried creating a custom &quot;Category&quot; field but I can't see how to link this just to a particular category of products nor can I get it to show anywhere in the front end, either on the product page or the registration page.  After creating the custom category fields, I can see them when I edit the category details but can't seem to turn some off for a particular category.  Any help appreciated!")*

in my continuing monologue ![:-)](/media/kunena/emoticons/3.png ":-)")...
there appears to be no javascript controlls or functions that i can find that would cause the behavior to happen. what am i missing?
Liz

[edit]
so the function hikashopToggleFields is not appearing on my custom fields where it should be. a look in the files revealed this:
the file form_fields.php has the following code for toggling:
&lt;?php foreach($this-&gt;extraFields as $fieldName =&gt; $oneExtraField) { ?&gt;
&lt;tr id="hikashop_entry_&lt;?php echo $fieldName.'_'.$this-&gt;id;?&gt;" class="hikashop_entry_&lt;?php echo $fieldName;?&gt;"&gt;
&lt;td class="key"&gt;
&lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($oneExtraField);?&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;?php echo $this-&gt;fieldsClass-&gt;display($oneExtraField,$this-&gt;entry-&gt;$fieldName,'data[entry][entry_'.$this-&gt;id.']',false,' onchange="hikashopToggleFields(this.value,\''.$fieldName.'\',\'entry\','.$this-&gt;id.');"'); ?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;?php }?&gt;

however my base template looks like this for custom fields:
&lt;?php
$type = $this-&gt;type;
foreach($this-&gt;extraFields[$type] as $fieldName =&gt; $oneExtraField) {
?&gt;
&lt;tr class="hikashop_checkout_&lt;?php echo $fieldName;?&gt;_line"&gt;
&lt;td class="key"&gt;
&lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($oneExtraField);?&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;?php
echo $this-&gt;fieldsClass-&gt;display($oneExtraField,$this-&gt;$type-&gt;$fieldName,'data');
?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;?php } ?&gt;

shouldnt there be some language about if the field is limited and applying the toggle function and javascript?? where does this occur and why is it not occurring on my fields?

Last edit: 15 years 3 months ago by [MinnieMouse](/forum/user/3535-minniemouse "View MinnieMouse's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMDcwLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.110 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
