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

#   Boolean Custom Field default value

##

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

Less More

- Posts: 127
- Thank you received: 6
-
-

7 years 9 months ago [\#303260](#303260) by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")  *[Boolean Custom Field default value](/forum/33-customers/896792-boolean-custom-field-default-value#303260 "-- HikaShop version -- : 4.01 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.2  Hello I have a Custom Field in the Users table - a simple Yes / No option. I have set the default value to Yes, but, when a new User is created the field always is set at No.  I cannot see what the problem is or how to resolve - it seems so simple...")* was created by *[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")*

-- HikaShop version -- : 4.01
-- Joomla version -- : 3.6.5
-- PHP version -- : 7.2

Hello
I have a Custom Field in the Users table - a simple Yes / No option.
I have set the default value to Yes, but, when a new User is created the field always is set at No.

I cannot see what the problem is or how to resolve - it seems so simple...

[ ![hshopuserfield.jpg](/forum/attachment/45993) ](/forum/attachment/45993 "...puserfield.jpg")

- [ ![hshopuserfield.jpg](/forum/attachment/45993) ](/forum/attachment/45993 "...puserfield.jpg") [ ](/forum/attachment/45993?download=1 "...puserfield.jpg")

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

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

Less More

- Posts: 4820
- Thank you received: 652
-
-

7 years 9 months ago -  7 years 9 months ago [\#303269](#303269) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Boolean Custom Field default value](/forum/33-customers/896792-boolean-custom-field-default-value#303269 "-- HikaShop version -- : 4.01 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.2  Hello I have a Custom Field in the Users table - a simple Yes / No option. I have set the default value to Yes, but, when a new User is created the field always is set at No.  I cannot see what the problem is or how to resolve - it seems so simple...")*

Hello,

I had created myself a user custom filed by **using your settings**, and wasn't able to reproduce and see your issue.
Can you provide a **step by step** in order to allow us to reproduce the context, don't forget to detailed everything and precise where you see a default Boolean set by default to "no"

Awaiting news from you
Regards

Last edit: 7 years 9 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

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

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

Less More

- Posts: 127
- Thank you received: 6
-
-

7 years 9 months ago -  7 years 9 months ago [\#303278](#303278) by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")  Replied by *[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")* on topic *[Boolean Custom Field default value](/forum/33-customers/896792-boolean-custom-field-default-value#303278 "-- HikaShop version -- : 4.01 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.2  Hello I have a Custom Field in the Users table - a simple Yes / No option. I have set the default value to Yes, but, when a new User is created the field always is set at No.  I cannot see what the problem is or how to resolve - it seems so simple...")*

Merci Philippe
1. Attached the field settings list...
[ ![HKShopcustomfieldslist.jpg](/forum/attachment/45999) ](/forum/attachment/45999 "...fieldslist.jpg")

2. And the field details...
[ ![HKShopfieldsettings.jpg](/forum/attachment/45998) ](/forum/attachment/45998 "...ldsettings.jpg")

3. I create a new user from the back-end...
[ ![HKShopcreatenewuser.jpg](/forum/attachment/45997) ](/forum/attachment/45997 "...atenewuser.jpg")

4. I check the new user's details in Hikashop...
[ ![HKShopnewuserdetails.jpg](/forum/attachment/45996) ](/forum/attachment/45996 "...serdetails.jpg")

For some reason the Invite For Review field shows "No", but the default setting shows as "Yes".
Je suis un peu confus...

Checking the front end, the new user also has their Subscribe to Newsletter set to True, yet the default is False - also a little strange...

[ ![HKShopnewuserprofile.jpg](/forum/attachment/46000) ](/forum/attachment/46000 "...serprofile.jpg")

- [ ![HKShopnewuserdetails.jpg](/forum/attachment/45996) ](/forum/attachment/45996 "...serdetails.jpg") [ ](/forum/attachment/45996?download=1 "...serdetails.jpg")
- [ ![HKShopcreatenewuser.jpg](/forum/attachment/45997) ](/forum/attachment/45997 "...atenewuser.jpg") [ ](/forum/attachment/45997?download=1 "...atenewuser.jpg")
- [ ![HKShopfieldsettings.jpg](/forum/attachment/45998) ](/forum/attachment/45998 "...ldsettings.jpg") [ ](/forum/attachment/45998?download=1 "...ldsettings.jpg")
- [ ![HKShopcustomfieldslist.jpg](/forum/attachment/45999) ](/forum/attachment/45999 "...fieldslist.jpg") [ ](/forum/attachment/45999?download=1 "...fieldslist.jpg")
- [ ![HKShopnewuserprofile.jpg](/forum/attachment/46000) ](/forum/attachment/46000 "...serprofile.jpg") [ ](/forum/attachment/46000?download=1 "...serprofile.jpg")

Last edit: 7 years 9 months ago by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile").

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

Less More

- Posts: 86556
- Thank you received: 14304
-
-

7 years 9 months ago [\#303280](#303280) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Boolean Custom Field default value](/forum/33-customers/896792-boolean-custom-field-default-value#303280 "-- HikaShop version -- : 4.01 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.2  Hello I have a Custom Field in the Users table - a simple Yes / No option. I have set the default value to Yes, but, when a new User is created the field always is set at No.  I cannot see what the problem is or how to resolve - it seems so simple...")*

Hi,

It's actually not a problem of the fact that the custom field is a boolean custom field. you would have the same issue with any kind of custom user field with a default value.
That's because you create the user from the backend and on the backend form to create the user, these custom user fields don't show up so their default value cannot be initialized.
However, if you test again by creating a user from the HikaShop registration form on the frontend, you shouldn't have the problem as you will see the custom fields on the registration form.
I suppose that it is why Philippe didn't had the problem since he must have tried to reproduce by creating a user from the frontend, since that's what 99% of the merchants care about.
Now we could potentially add the capability to set the default value when creating the user from the backend but that's not something that easy to add.

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

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

Less More

- Posts: 127
- Thank you received: 6
-
-

7 years 9 months ago [\#303307](#303307) by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")  Replied by *[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")* on topic *[Boolean Custom Field default value](/forum/33-customers/896792-boolean-custom-field-default-value#303307 "-- HikaShop version -- : 4.01 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.2  Hello I have a Custom Field in the Users table - a simple Yes / No option. I have set the default value to Yes, but, when a new User is created the field always is set at No.  I cannot see what the problem is or how to resolve - it seems so simple...")*

Thanks for looking Nicolas.
It does happen also from the front end, both the custom field and the subscribe field too.

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

Less More

- Posts: 86556
- Thank you received: 14304
-
-

7 years 9 months ago [\#303319](#303319) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Boolean Custom Field default value](/forum/33-customers/896792-boolean-custom-field-default-value#303319 "-- HikaShop version -- : 4.01 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.2  Hello I have a Custom Field in the Users table - a simple Yes / No option. I have set the default value to Yes, but, when a new User is created the field always is set at No.  I cannot see what the problem is or how to resolve - it seems so simple...")*

Hi,

You mean even when you register through the HikaShop registration form ? (I'm not talking about joomla's since the fields don't appear on Joomla's registration form either)

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

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

Less More

- Posts: 127
- Thank you received: 6
-
-

7 years 9 months ago [\#303333](#303333) by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")  Replied by *[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")* on topic *[Boolean Custom Field default value](/forum/33-customers/896792-boolean-custom-field-default-value#303333 "-- HikaShop version -- : 4.01 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.2  Hello I have a Custom Field in the Users table - a simple Yes / No option. I have set the default value to Yes, but, when a new User is created the field always is set at No.  I cannot see what the problem is or how to resolve - it seems so simple...")*

Yes Nicolas, exactly that.

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

Less More

- Posts: 86556
- Thank you received: 14304
-
-

7 years 9 months ago -  7 years 8 months ago [\#303335](#303335) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Boolean Custom Field default value](/forum/33-customers/896792-boolean-custom-field-default-value#303335 "-- HikaShop version -- : 4.01 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.2  Hello I have a Custom Field in the Users table - a simple Yes / No option. I have set the default value to Yes, but, when a new User is created the field always is set at No.  I cannot see what the problem is or how to resolve - it seems so simple...")*

Hi,

And are you sure that you turned on the "frontend" display setting of your custom user fields so that they can display on the frontend ? Otherwise, they will be ignored like when you create a user from the frontend.

Last edit: 7 years 8 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

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

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

Less More

- Posts: 127
- Thank you received: 6
-
-

7 years 9 months ago -  7 years 9 months ago [\#303379](#303379) by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")  Replied by *[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")* on topic *[Boolean Custom Field default value](/forum/33-customers/896792-boolean-custom-field-default-value#303379 "-- HikaShop version -- : 4.01 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.2  Hello I have a Custom Field in the Users table - a simple Yes / No option. I have set the default value to Yes, but, when a new User is created the field always is set at No.  I cannot see what the problem is or how to resolve - it seems so simple...")*

Yes Nicolas - just tried that way again and took screen shots to show you...
But anyway, we would not want this field to appear on the user profile. This is a field just for our back-end use.

[ ![HKShopYetAnotherfieldlist.jpg](/forum/attachment/46028) ](/forum/attachment/46028 "...rfieldlist.jpg")

[ ![HKShopuserprofile.jpg](/forum/attachment/46027) ](/forum/attachment/46027 "...serprofile.jpg")

And you will notice that although Subscribe to Newsletter is set default = No, it appears as checked, which is not as intended.

Hope this helps - I think I have correctly understood how to configure these fields.

EDIT: Just updated to Joomla 3.9.2 from 3.6.5, but sorry, that didn't fix this issue. (PHP 7.2.14 HKShop 4.0.1)

- [ ![HKShopuserprofile.jpg](/forum/attachment/46027) ](/forum/attachment/46027 "...serprofile.jpg") [ ](/forum/attachment/46027?download=1 "...serprofile.jpg")
- [ ![HKShopYetAnotherfieldlist.jpg](/forum/attachment/46028) ](/forum/attachment/46028 "...rfieldlist.jpg") [ ](/forum/attachment/46028?download=1 "...rfieldlist.jpg")

Last edit: 7 years 9 months ago by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile").

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

7 years 9 months ago [\#303385](#303385) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Boolean Custom Field default value](/forum/33-customers/896792-boolean-custom-field-default-value#303385 "-- HikaShop version -- : 4.01 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.2  Hello I have a Custom Field in the Users table - a simple Yes / No option. I have set the default value to Yes, but, when a new User is created the field always is set at No.  I cannot see what the problem is or how to resolve - it seems so simple...")*

Hello,

Nicolas wrote :

> And are you sure that you turned on the "frontend" display setting of your custom user fields so that they can display on the frontend ?

And regarding your screenshot, the field "invite to review" IS displayed in the front-end, we can see the green checkmark on the column just after the ordering column.

So the field is displayed in the front-end because it is configured as well.
But your screenshot is showing the edition of the profile ; not the registration. Which mean that we can't deduce anything from that except that when you edit a profile, it load the current saved data.

For that part, Nicolas already gave you the answer :

> That's because you create the user from the backend and on the backend form to create the user, these custom user fields don't show up so their default value cannot be initialized.

For the registration, since we do not have any details about the issue (nor the kind of registration you're using ; because it might be something which is not the HikaShop registration form, so something which might not handle the HikaShop fields).

Afterwards, regarding the newsletter ; I'm afraid that is not related to HikaShop stuff but to your newsletter component.
Please understand that we do only provide support for our components.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

Less More

- Posts: 127
- Thank you received: 6
-
-

7 years 8 months ago [\#304045](#304045) by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")  Replied by *[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")* on topic *[Boolean Custom Field default value](/forum/33-customers/896792-boolean-custom-field-default-value#304045 "-- HikaShop version -- : 4.01 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.2  Hello I have a Custom Field in the Users table - a simple Yes / No option. I have set the default value to Yes, but, when a new User is created the field always is set at No.  I cannot see what the problem is or how to resolve - it seems so simple...")*

Thanks for your reply Jerome
The screen shots show the results of Nocolas' suggestion. He suggested I tried "Show on Front End", so I did and then gave Screenshots to show the results of his suggestion. The user was created on the Front End also, as Nicolas suggested.

You can see that new user has their Invite-For-Review setting to "No", whilst the settings for that field default = "Yes".

So, it doesn't make any difference Front End or Back End user creation, Show on Front End or Hide on Front End - the default setting is ignored (which is a pain).

And yes, we do use the Hikashop registration form.
As for the newsletter setting I will follow up elsewhere, of course.

So, not sure what to try next? Your help is always appreciated.
Thanks, Bob

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

Less More

- Posts: 86556
- Thank you received: 14304
-
-

7 years 8 months ago [\#304051](#304051) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Boolean Custom Field default value](/forum/33-customers/896792-boolean-custom-field-default-value#304051 "-- HikaShop version -- : 4.01 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.2  Hello I have a Custom Field in the Users table - a simple Yes / No option. I have set the default value to Yes, but, when a new User is created the field always is set at No.  I cannot see what the problem is or how to resolve - it seems so simple...")*

Hi,

We're not able to reproduce the problem on our end.
I wanted to look at the issue on your website, however, I don't see the custom field on your checkout registration form:
[ monosnap.com/file/AoHevxBBQGGzQTMph1RLDd8HMEScbJ](https://monosnap.com/file/AoHevxBBQGGzQTMph1RLDd8HMEScbJ)
And when I try to access the registration form page, I see the registration form page of Joomla, not HikaShop's, as you didn't activate the Redirect Joomla registration to HikaShop plugin via the Joomla plugins manager:
[ monosnap.com/file/8OxRfcNmH8YkGM9B9OgT0pI5G6015N](https://monosnap.com/file/8OxRfcNmH8YkGM9B9OgT0pI5G6015N)

Note that the default value of a custom field is the default value used to initialize the custom field when it is displayed in a form.
If you create the element through another mean than a form where the custom field is displayed, then the default value won't be set.
That goes for users but also for any other custom field.
For example, if you have a custom order field with a default value but you click on the "new" button of the orders listing in the backend, the default value won't be set as the custom field won't display through that process. It would however if you configure the custom field to display through the checkout (which is usually the case for custom order fields).
So if you create the user through the Joomla user manager in the backend, through the joomla user registration form of the frontend, or even if you created the user account through the HikaShop registration form BEFORE you configured the custom field or its default value, then you won't see the default value when you edit the user profile.

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

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

Less More

- Posts: 127
- Thank you received: 6
-
-

7 years 8 months ago [\#304067](#304067) by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")  Replied by *[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")* on topic *[Boolean Custom Field default value](/forum/33-customers/896792-boolean-custom-field-default-value#304067 "-- HikaShop version -- : 4.01 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.2  Hello I have a Custom Field in the Users table - a simple Yes / No option. I have set the default value to Yes, but, when a new User is created the field always is set at No.  I cannot see what the problem is or how to resolve - it seems so simple...")*

Thanks Nicolas.
Your explanation makes perfect sense and I do appreciate your time.
BUT, I do have the Redirect To Hikashop Plugin enabled... So I cannot explain why both checkout and page use the Joomla Registration component. The plugin is version 4.02, so quite new.

You do still have access to the site if you wish to confirm. This message contains confidential information

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

Less More

- Posts: 86556
- Thank you received: 14304
-
-

7 years 8 months ago [\#304107](#304107) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Boolean Custom Field default value](/forum/33-customers/896792-boolean-custom-field-default-value#304107 "-- HikaShop version -- : 4.01 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.2  Hello I have a Custom Field in the Users table - a simple Yes / No option. I have set the default value to Yes, but, when a new User is created the field always is set at No.  I cannot see what the problem is or how to resolve - it seems so simple...")*

Hi,

I checked your settings.
All your custom user fields have the "frontend" setting turned off.
So the custom user fields are not displayed on the HikaShop registration forms on the frontend and thus their value is not initialized, as if you were registering through the Joomla registration form.
You need to activate the custom fields and if you don't want to display them to the user, you can use custom CSS to hide them.
Alternatively, do no use a "boolean" type but a radio type. Then, when you add the yes / no values to the custom field values list, make sure that you leave the "value" input empty for the default value you want. That way, even if the custom field is not displayed on the form, the default value will correspond to the field not being used and it will display properly on your user details page in the backend.

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

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

Less More

- Posts: 127
- Thank you received: 6
-
-

7 years 7 months ago [\#304828](#304828) by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")  Replied by *[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")* on topic *[Boolean Custom Field default value](/forum/33-customers/896792-boolean-custom-field-default-value#304828 "-- HikaShop version -- : 4.01 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.2  Hello I have a Custom Field in the Users table - a simple Yes / No option. I have set the default value to Yes, but, when a new User is created the field always is set at No.  I cannot see what the problem is or how to resolve - it seems so simple...")*

Merci Nicolas
Good advice - I prefer the Radio type field method in this case. All is then private from the user.
Cordialement, Bob

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

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