Skip to Content Skip to Menu

First "0" deleted in text fields :(

9 years 7 months ago #260811 by Andromeda57
First "0" deleted in text fields :( was created by Andromeda57
Hi guys,

is it normal that the "0" is deleted in our text fields after upgrading to cb 2?

We have a text field called postal code. So there are many entries like 01738.

Now it is just written 1738... ???

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
9 years 7 months ago #260814 by nant
Replied by nant on topic First "0" deleted in text fields :(

Andromeda57 wrote: Hi guys,

is it normal that the "0" is deleted in our text fields after upgrading to cb 2?

We have a text field called postal code. So there are many entries like 01738.

Now it is just written 1738... ???


No its not normal - text fields do not strip 0 character.

Are you sure that the field you are testing is not an integer number field?

Please Log in or Create an account to join the conversation.

9 years 7 months ago #260817 by Andromeda57
Replied by Andromeda57 on topic First "0" deleted in text fields :(
Hi,

yes very sure. We have a catalog with cb since a long time, in the past we had this problem with the integer fields. So we changed to text fields in the past. That is why i am absolutely sure, that the fields are text fields and nothing else.. :)

But after the update we have to change the postal codes with 0 at the beginning, because the 0 at the beginning is killed in every postal code (text field) .. :(

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
9 years 7 months ago #260836 by krileon
Replied by krileon on topic First "0" deleted in text fields :(
Text fields don't have this behavior. The reason integer fields do that is it's normal PHP behavior when casted to int. I can't see how this is possible unless you're using something else to display the field value maybe. Is the leading 0 still present in the _comprofiler table? Are you using CB Query Field to output the field or some other form of displaying it?


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum