- Posts: 196
- Thank you received: 15
The length of the default value of the custom field
- StudioPrzyLesie
-
Topic Author
- Offline
Less
More
3 years 11 months ago #345189
by StudioPrzyLesie
Is it possible to change the default value of the custom field from 255 e.g. to 500 characters?
Best Regards
Tomek
Best Regards
Tomek
Please Log in or Create an account to join the conversation.
3 years 11 months ago #345198
by nicolas
Replied by nicolas on topic The length of the default value of the custom field
Hi,
The default value of a custom field can be changed by editing the custom field in the menu Display>Custom fields. There, you have a setting "default" where you can enter/select the default value of the custom field.
There is no limit setting for the length of the text you can enter in a custom field.
However, it is limited by the type of the column corresponding to the custom field in the database.
By default the type of the column is LONGTEXT which gives a maximum length of 4,294,967,295 characters.
So if that's what you're talking about, I would recommend checking the column type for that custom field in the database. If it's set to "VARCHAR" then the maximum number of characters will be 255 characters.
The default value of a custom field can be changed by editing the custom field in the menu Display>Custom fields. There, you have a setting "default" where you can enter/select the default value of the custom field.
There is no limit setting for the length of the text you can enter in a custom field.
However, it is limited by the type of the column corresponding to the custom field in the database.
By default the type of the column is LONGTEXT which gives a maximum length of 4,294,967,295 characters.
So if that's what you're talking about, I would recommend checking the column type for that custom field in the database. If it's set to "VARCHAR" then the maximum number of characters will be 255 characters.
Please Log in or Create an account to join the conversation.
- StudioPrzyLesie
-
Topic Author
- Offline
Less
More
- Posts: 196
- Thank you received: 15
3 years 11 months ago #345199
by StudioPrzyLesie
Replied by StudioPrzyLesie on topic The length of the default value of the custom field
Nicolas,
it is about the length of the default value, where, for example, we have a text field and the default value for a new product will be "product contains allergens". The default value field is of the varchar type, i.e. max 255 - won't anything break when you change the database to Longtext?
it is about the length of the default value, where, for example, we have a text field and the default value for a new product will be "product contains allergens". The default value field is of the varchar type, i.e. max 255 - won't anything break when you change the database to Longtext?
Please Log in or Create an account to join the conversation.
3 years 11 months ago #345208
by nicolas
Replied by nicolas on topic The length of the default value of the custom field
Hi,
Ok, I see what you mean. Then, open the hikashop_field table in your PHPMyAdmin and change the type of the "field_default" column from "VARCHAR" to "LONGTEXT".
Nothing will break. And you won't have issues with updates either, don't worry.
Ok, I see what you mean. Then, open the hikashop_field table in your PHPMyAdmin and change the type of the "field_default" column from "VARCHAR" to "LONGTEXT".
Nothing will break. And you won't have issues with updates either, don't worry.
Please Log in or Create an account to join the conversation.
- StudioPrzyLesie
-
Topic Author
- Offline
Less
More
- Posts: 196
- Thank you received: 15
3 years 11 months ago #345213
by StudioPrzyLesie
Replied by StudioPrzyLesie on topic The length of the default value of the custom field
Thanks,
it works
Tomek
it works
Tomek
Please Log in or Create an account to join the conversation.
Time to create page: 0.158 seconds