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

#   Development of a custom field - documentation and/or help needed

##

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

Less More

- Posts: 29
- Thank you received: 2
-
-

4 years 6 months ago [\#341088](#341088) by [pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")  *[Development of a custom field - documentation and/or help needed](/forum/31-development/904305-development-of-a-custom-field-documentation-and-or-help-needed#341088 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 4.1 -- PHP version -- : 7.4  Is there any documentation available for creation of custom custom fields? I am making progress by looking at the datepickerfield plugin, but various bits are unclear to me, such as  Method plgHikashopDatepickerfield::onFieldsLoad() of the datepickerfield plugin sets a list of options I don't know what they are used for and whether I need all or any of them for my field.  For educational purposes I created a datepicker custom field to see how it's used and displayed. For some reason, that field not only displays the datepicker options, but also the options of my own custom field. I don't have a clue why that is.  Some pointers would be highly appreciated :)")* was created by *[pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")*

-- HikaShop version -- : 4.4.5
-- Joomla version -- : 4.1
-- PHP version -- : 7.4

Is there any documentation available for creation of custom custom fields? I am making progress by looking at the datepickerfield plugin, but various bits are unclear to me, such as

Method **plgHikashopDatepickerfield::onFieldsLoad()** of the datepickerfield plugin sets a list of options Code:

$me-&gt;options = array('required', 'default', 'columnname', 'format', 'allow', 'datepicker_options')

I don't know what they are used for and whether I need all or any of them for my field.

For educational purposes I created a datepicker custom field to see how it's used and displayed. For some reason, that field not only displays the datepicker options, but also the options of my own custom field. I don't have a clue why that is.

Some pointers would be highly appreciated ![:)](/media/kunena/emoticons/8.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2RldmVsb3BtZW50LzkwNDMwNS1kZXZlbG9wbWVudC1vZi1hLWN1c3RvbS1maWVsZC1kb2N1bWVudGF0aW9uLWFuZC1vci1oZWxwLW5lZWRlZD90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

4 years 5 months ago [\#341092](#341092) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Development of a custom field - documentation and/or help needed](/forum/31-development/904305-development-of-a-custom-field-documentation-and-or-help-needed#341092 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 4.1 -- PHP version -- : 7.4  Is there any documentation available for creation of custom custom fields? I am making progress by looking at the datepickerfield plugin, but various bits are unclear to me, such as  Method plgHikashopDatepickerfield::onFieldsLoad() of the datepickerfield plugin sets a list of options I don't know what they are used for and whether I need all or any of them for my field.  For educational purposes I created a datepicker custom field to see how it's used and displayed. For some reason, that field not only displays the datepicker options, but also the options of my own custom field. I don't have a clue why that is.  Some pointers would be highly appreciated :)")*

Hi,

This list of options allow you to ask HikaShop's custom field edit interface to display specific options.
If you check the HTML of the elements there, you can see an attribute "data-hk-display" :
[ i.imgur.com/oi2bebt.png](https://i.imgur.com/oi2bebt.png)
That attribute will contain one of the potential values for that options array. If your custom field type is selected for the current custom field, the system will automatically display all the options with that data-hk-display being equal to one of the options you added in that array and will hide the others.
For example, you can see a "placeholder" option in my screenshot. But this is only needed for text and textarea custom fields. That's why the advanced date picker plugin doesn't have it listed.
In the file administrator/components/com_hikashop/types/fields.php you can see the list of all the available types of custom fields along with their options (besides the advanced date picker field type since it comes from a plugin on the side).

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

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

Less More

- Posts: 29
- Thank you received: 2
-
-

4 years 5 months ago [\#341151](#341151) by [pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")  Replied by *[pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")* on topic *[Development of a custom field - documentation and/or help needed](/forum/31-development/904305-development-of-a-custom-field-documentation-and-or-help-needed#341151 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 4.1 -- PHP version -- : 7.4  Is there any documentation available for creation of custom custom fields? I am making progress by looking at the datepickerfield plugin, but various bits are unclear to me, such as  Method plgHikashopDatepickerfield::onFieldsLoad() of the datepickerfield plugin sets a list of options I don't know what they are used for and whether I need all or any of them for my field.  For educational purposes I created a datepicker custom field to see how it's used and displayed. For some reason, that field not only displays the datepicker options, but also the options of my own custom field. I don't have a clue why that is.  Some pointers would be highly appreciated :)")*

Thanx Nicolas.

A somewhat questionable, but creative way of hiding unused options ![:)](/media/kunena/emoticons/8.png ":)") Unfortunately It has (at least) one undesirable side effect. If no options are in effect for a group, like the Main Attributes for instance, an empty box, with a title but without any option fields, is displayed. Is there an easy way to prevent that?

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

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

Less More

- Posts: 29
- Thank you received: 2
-
-

4 years 5 months ago [\#341153](#341153) by [pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")  Replied by *[pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")* on topic *[Development of a custom field - documentation and/or help needed](/forum/31-development/904305-development-of-a-custom-field-documentation-and-or-help-needed#341153 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 4.1 -- PHP version -- : 7.4  Is there any documentation available for creation of custom custom fields? I am making progress by looking at the datepickerfield plugin, but various bits are unclear to me, such as  Method plgHikashopDatepickerfield::onFieldsLoad() of the datepickerfield plugin sets a list of options I don't know what they are used for and whether I need all or any of them for my field.  For educational purposes I created a datepicker custom field to see how it's used and displayed. For some reason, that field not only displays the datepicker options, but also the options of my own custom field. I don't have a clue why that is.  Some pointers would be highly appreciated :)")*

I have another question, concerning a field's preview in combination with its **check()** method. My custom field is slightly different the most, in that it returns a stringified JSON value. The value represents a matrix of values, along with some meta data. The number of rows and/or columns for the matrix are field options that need to be set before the field can be used. After they have been set, the preview displays an empty matrix, showing the configured number of rows and/or columns. So far, so good.

The field's **check()** method makes sure all matrix cells contain a valid, non empty value. It also does so when changing any of the options, i.e. changing the number of rows and/or columns. However, when saving the field, the **check()** method fails and does not allow the field to be saved. I tried to enter some dummy data in the preview matrix, but for some reason the resulting JSON value does not get passed into the **check()** method.

I have two questions:

- Why is the field value of the preview field not passed into the **check()** method?
- Is there a way to detect in the **check()** method if I'm editing the field's options or the actual item the field is meant to be used for?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2RldmVsb3BtZW50LzkwNDMwNS1kZXZlbG9wbWVudC1vZi1hLWN1c3RvbS1maWVsZC1kb2N1bWVudGF0aW9uLWFuZC1vci1oZWxwLW5lZWRlZD90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

4 years 5 months ago [\#341158](#341158) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Development of a custom field - documentation and/or help needed](/forum/31-development/904305-development-of-a-custom-field-documentation-and-or-help-needed#341158 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 4.1 -- PHP version -- : 7.4  Is there any documentation available for creation of custom custom fields? I am making progress by looking at the datepickerfield plugin, but various bits are unclear to me, such as  Method plgHikashopDatepickerfield::onFieldsLoad() of the datepickerfield plugin sets a list of options I don't know what they are used for and whether I need all or any of them for my field.  For educational purposes I created a datepicker custom field to see how it's used and displayed. For some reason, that field not only displays the datepicker options, but also the options of my own custom field. I don't have a clue why that is.  Some pointers would be highly appreciated :)")*

Hi,

1.

> A somewhat questionable, but creative way of hiding unused options ![:)](/media/kunena/emoticons/8.png ":)") Unfortunately It has (at least) one undesirable side effect. If no options are in effect for a group, like the Main Attributes for instance, an empty box, with a title but without any option fields, is displayed. Is there an easy way to prevent that?

I'm sorry but I'm not following you here. Could you provide more information on your issue ?

2.
The preview area of the custom field edit interface is just for you to get a look at how the field will look like on the frontend.
There is no real saving done and thus no check called.
You must be mistaken with the "default" setting which also displays the your custom field in the custom field edit interface and is saved to be used as default value when the custom field is then used elsewhere.
In fact, if you don't have "default" in the options array, the default area's HTML will still be on the page, but hidden, and thus the check function will be called for the default input even if you don't see it, and thus that's normal that the value provided is empty as you didn't even had a chance to enter something in it in the interface.
So to check whether you're checking for a real element or the default value in the backend, you can look at the $field-&gt;field_namekey in your check function. That variable should contain "field_default" when checking the default value and otherwise it will be the field's column name.

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

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

Less More

- Posts: 29
- Thank you received: 2
-
-

4 years 5 months ago [\#341172](#341172) by [pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")  Replied by *[pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")* on topic *[Development of a custom field - documentation and/or help needed](/forum/31-development/904305-development-of-a-custom-field-documentation-and-or-help-needed#341172 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 4.1 -- PHP version -- : 7.4  Is there any documentation available for creation of custom custom fields? I am making progress by looking at the datepickerfield plugin, but various bits are unclear to me, such as  Method plgHikashopDatepickerfield::onFieldsLoad() of the datepickerfield plugin sets a list of options I don't know what they are used for and whether I need all or any of them for my field.  For educational purposes I created a datepicker custom field to see how it's used and displayed. For some reason, that field not only displays the datepicker options, but also the options of my own custom field. I don't have a clue why that is.  Some pointers would be highly appreciated :)")*

Thanks Nicolas. Your answer to my second question allows me to check on the default field. Because the field has no sensible default value, the check can no always return true.

For clarification of my first question, I added a screen shot of the custom field edit interface. As you can see the **MAIN ATTRIBUTES** area is completely empty. It would be user friendly to not display empty such empty areas.

- [ ![Image004.jpg](/forum/attachment/54737) ](/forum/attachment/54737 "Image004.jpg") [ ](/forum/attachment/54737?download=1 "Image004.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2RldmVsb3BtZW50LzkwNDMwNS1kZXZlbG9wbWVudC1vZi1hLWN1c3RvbS1maWVsZC1kb2N1bWVudGF0aW9uLWFuZC1vci1oZWxwLW5lZWRlZD90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

4 years 5 months ago [\#341175](#341175) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Development of a custom field - documentation and/or help needed](/forum/31-development/904305-development-of-a-custom-field-documentation-and-or-help-needed#341175 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 4.1 -- PHP version -- : 7.4  Is there any documentation available for creation of custom custom fields? I am making progress by looking at the datepickerfield plugin, but various bits are unclear to me, such as  Method plgHikashopDatepickerfield::onFieldsLoad() of the datepickerfield plugin sets a list of options I don't know what they are used for and whether I need all or any of them for my field.  For educational purposes I created a datepicker custom field to see how it's used and displayed. For some reason, that field not only displays the datepicker options, but also the options of my own custom field. I don't have a clue why that is.  Some pointers would be highly appreciated :)")*

Hi,

Ah yes, now I understand what you mean.
You're right. There's actually a mechanism to handle the whole area. We just forgot to implement it for that area.
Change the line: Code:

&lt;div class="hkc-xl-4 hkc-lg-6 hikashop_tile_block hikashop_field_edit_attributes"&gt;&lt;div&gt;

to: Code:

&lt;div class="hkc-xl-4 hkc-lg-6 hikashop_tile_block hikashop_field_edit_attributes" data-hk-displays="required,regex,attribute,placeholder,inline,target_blank,default,add"&gt;&lt;div&gt;

in the file administrator/components/com_hikashop/views/field/tmpl/form.php and it will hide the area when empty.
We'll add that change on our end for the next version of HikaShop.

The following user(s) said Thank You: [pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")

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

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

Less More

- Posts: 29
- Thank you received: 2
-
-

4 years 5 months ago [\#341208](#341208) by [pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")  Replied by *[pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")* on topic *[Development of a custom field - documentation and/or help needed](/forum/31-development/904305-development-of-a-custom-field-documentation-and-or-help-needed#341208 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 4.1 -- PHP version -- : 7.4  Is there any documentation available for creation of custom custom fields? I am making progress by looking at the datepickerfield plugin, but various bits are unclear to me, such as  Method plgHikashopDatepickerfield::onFieldsLoad() of the datepickerfield plugin sets a list of options I don't know what they are used for and whether I need all or any of them for my field.  For educational purposes I created a datepicker custom field to see how it's used and displayed. For some reason, that field not only displays the datepicker options, but also the options of my own custom field. I don't have a clue why that is.  Some pointers would be highly appreciated :)")*

Thanx again Nicolas!

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

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

Less More

- Posts: 29
- Thank you received: 2
-
-

4 years 5 months ago [\#341315](#341315) by [pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")  Replied by *[pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")* on topic *[Development of a custom field - documentation and/or help needed](/forum/31-development/904305-development-of-a-custom-field-documentation-and-or-help-needed#341315 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 4.1 -- PHP version -- : 7.4  Is there any documentation available for creation of custom custom fields? I am making progress by looking at the datepickerfield plugin, but various bits are unclear to me, such as  Method plgHikashopDatepickerfield::onFieldsLoad() of the datepickerfield plugin sets a list of options I don't know what they are used for and whether I need all or any of them for my field.  For educational purposes I created a datepicker custom field to see how it's used and displayed. For some reason, that field not only displays the datepicker options, but also the options of my own custom field. I don't have a clue why that is.  Some pointers would be highly appreciated :)")*

Yet another question.

I have a more or less working custom field type now. I can add it as a new custom field to table "product" and, when creating a new product, I can fill in the data for that field in the "CUSTOM FIELDS" section. The problem is I don't see that data in the product. Not in the parameter for the "onBeforeCalculateProductPriceForQuantity" event handler and also not when loading products using the product class like so: $productClass-&gt;getProducts([$productId]).

What am I missing here?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2RldmVsb3BtZW50LzkwNDMwNS1kZXZlbG9wbWVudC1vZi1hLWN1c3RvbS1maWVsZC1kb2N1bWVudGF0aW9uLWFuZC1vci1oZWxwLW5lZWRlZD90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

4 years 5 months ago [\#341316](#341316) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Development of a custom field - documentation and/or help needed](/forum/31-development/904305-development-of-a-custom-field-documentation-and-or-help-needed#341316 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 4.1 -- PHP version -- : 7.4  Is there any documentation available for creation of custom custom fields? I am making progress by looking at the datepickerfield plugin, but various bits are unclear to me, such as  Method plgHikashopDatepickerfield::onFieldsLoad() of the datepickerfield plugin sets a list of options I don't know what they are used for and whether I need all or any of them for my field.  For educational purposes I created a datepicker custom field to see how it's used and displayed. For some reason, that field not only displays the datepicker options, but also the options of my own custom field. I don't have a clue why that is.  Some pointers would be highly appreciated :)")*

Hi,

In onBeforeCalculateProductPriceForQuantity you get an element from the table hikashop_cart_product so it's normal that you don't have the data of custom product fields.
However, since you have the product_id, you can load it like this: Code:

$productClass = hikashop_get('class.product'); $data = $productClass-&gt;get($product-&gt;product_id); echo $data-&gt;xxx;

where xxx is the column name of your custom product field.
getProducts will also load that data but it's a bit more complex because it can load the data of several products, the variants, etc : Code:

$productClass = hikashop_get('class.product'); $productClass-&gt;getProducts(array($product-&gt;product_id)); echo $productClass-&gt;products[$product-&gt;product_id]-&gt;xxx;

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

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

Less More

- Posts: 29
- Thank you received: 2
-
-

4 years 5 months ago [\#341324](#341324) by [pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")  Replied by *[pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")* on topic *[Development of a custom field - documentation and/or help needed](/forum/31-development/904305-development-of-a-custom-field-documentation-and-or-help-needed#341324 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 4.1 -- PHP version -- : 7.4  Is there any documentation available for creation of custom custom fields? I am making progress by looking at the datepickerfield plugin, but various bits are unclear to me, such as  Method plgHikashopDatepickerfield::onFieldsLoad() of the datepickerfield plugin sets a list of options I don't know what they are used for and whether I need all or any of them for my field.  For educational purposes I created a datepicker custom field to see how it's used and displayed. For some reason, that field not only displays the datepicker options, but also the options of my own custom field. I don't have a clue why that is.  Some pointers would be highly appreciated :)")*

Hi Nicolas,

Thanks again for the swift response. This time I feel really stupid, because I was testing with a faulty product; a product without my custom field. I feel embarrassed and apologize for wasting your time :blush:

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2RldmVsb3BtZW50LzkwNDMwNS1kZXZlbG9wbWVudC1vZi1hLWN1c3RvbS1maWVsZC1kb2N1bWVudGF0aW9uLWFuZC1vci1oZWxwLW5lZWRlZD90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

4 years 5 months ago [\#341329](#341329) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Development of a custom field - documentation and/or help needed](/forum/31-development/904305-development-of-a-custom-field-documentation-and-or-help-needed#341329 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 4.1 -- PHP version -- : 7.4  Is there any documentation available for creation of custom custom fields? I am making progress by looking at the datepickerfield plugin, but various bits are unclear to me, such as  Method plgHikashopDatepickerfield::onFieldsLoad() of the datepickerfield plugin sets a list of options I don't know what they are used for and whether I need all or any of them for my field.  For educational purposes I created a datepicker custom field to see how it's used and displayed. For some reason, that field not only displays the datepicker options, but also the options of my own custom field. I don't have a clue why that is.  Some pointers would be highly appreciated :)")*

No worries.

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

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

Less More

- Posts: 29
- Thank you received: 2
-
-

4 years 5 months ago [\#341397](#341397) by [pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")  Replied by *[pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")* on topic *[Development of a custom field - documentation and/or help needed](/forum/31-development/904305-development-of-a-custom-field-documentation-and-or-help-needed#341397 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 4.1 -- PHP version -- : 7.4  Is there any documentation available for creation of custom custom fields? I am making progress by looking at the datepickerfield plugin, but various bits are unclear to me, such as  Method plgHikashopDatepickerfield::onFieldsLoad() of the datepickerfield plugin sets a list of options I don't know what they are used for and whether I need all or any of them for my field.  For educational purposes I created a datepicker custom field to see how it's used and displayed. For some reason, that field not only displays the datepicker options, but also the options of my own custom field. I don't have a clue why that is.  Some pointers would be highly appreciated :)")*

Hoping I haven't overlooked the obvious once again, I have a new question.

My custom field is not meant for the front end but specifically for the back end. When editing a product, the custom field shows up in the "CUSTOM FIELDS" area, like it is supposed to. However, if the product has Variants, it also shows up on Variant editing pages. Is there a way to prevent that? Not just hide it, with CSS or something, but not include it on the page at all? If it exists on the page, the validation will be triggered and most certainly fail, preventing the page from being saved.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2RldmVsb3BtZW50LzkwNDMwNS1kZXZlbG9wbWVudC1vZi1hLWN1c3RvbS1maWVsZC1kb2N1bWVudGF0aW9uLWFuZC1vci1oZWxwLW5lZWRlZD90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

4 years 5 months ago [\#341399](#341399) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Development of a custom field - documentation and/or help needed](/forum/31-development/904305-development-of-a-custom-field-documentation-and-or-help-needed#341399 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 4.1 -- PHP version -- : 7.4  Is there any documentation available for creation of custom custom fields? I am making progress by looking at the datepickerfield plugin, but various bits are unclear to me, such as  Method plgHikashopDatepickerfield::onFieldsLoad() of the datepickerfield plugin sets a list of options I don't know what they are used for and whether I need all or any of them for my field.  For educational purposes I created a datepicker custom field to see how it's used and displayed. For some reason, that field not only displays the datepicker options, but also the options of my own custom field. I don't have a clue why that is.  Some pointers would be highly appreciated :)")*

Hi,

There is no option for that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2RldmVsb3BtZW50LzkwNDMwNS1kZXZlbG9wbWVudC1vZi1hLWN1c3RvbS1maWVsZC1kb2N1bWVudGF0aW9uLWFuZC1vci1oZWxwLW5lZWRlZD90bXBsPW1hcmtkb3du) 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.363 seconds

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

[](#top)
