How do I display a literal '0' in a text field?

Does the code that pulls data to populate fields convert a '0' into a null entry for a text field?  

 

For example, I enter into a custom Quantity: field a 0 and save the form. It's a zero in the db table but when editing the field, it shows up as an empty field.  

 

Is this normal or is it something I may have inadvertently caused modding some code somewhere?

 

Where is and what is the name of class that would do something like that?  

Quote · 29 Dec 2016

i have this same issue with radio sets - a 0 will not show as a number, it will just be an empty space next to the radio button.

caredesign.net
Quote · 29 Dec 2016

You need to be a little more specific on where this is happening.  A text character is not numeric and thus would not be null; also a null value is not the same as a numeric zero.

Geeks, making the world a better place
Quote · 30 Dec 2016

I am guessing that the number 0 as an answer in a text field does not return as 0 when retrieving the data from the database, but instead a blank.???

caredesign.net
Quote · 30 Dec 2016

Try it in an existing or custom non-required field without a 'at least 2 characters' length in a profile.  Doesn't matter if it is a text or number type field.  

 

A 0 is stored in the db but an input value of 0 is treated as null.  Put in a single alpha character a-z and it will retrieve that character and use it as the default value for the field. Any 1-9 character will work too. Something is up with using a 0. Weird.

 

I can track it down when I have some time to dig through code but thought could save some time finding someone that knows where the logic is that sets the value for text boxes served up in an edit form. :)

 

It likely is something I caused with a code tweak but if not, then it is a little bug that may need to get taken care of at some point.

Quote · 30 Dec 2016

i dont think it is something you did. As I stated before - the number 0 is not displayed as an option in a radio set. I am guessing they are both symptoms of the same issue.

 

this was an old post I had about the radio set - it has a solution - that I forgot about and do not know if will work in 7.3.3.

 

https://www.boonex.com/forums/topic/number-0-in-radio-set.htm

caredesign.net
Quote · 30 Dec 2016
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.