0

I have a channel field Text Input where I need to store numbers with comma as a string.

I set the fields Field Content to All.

Unfortunately, if I enter a comma in the field, like in 2,5, the field value is changed to 2.0000 after publishing. But I need it to stay the string 2,5. My database is full of the strings like this.

Why is this happening? Does the channel still think it is a decimal or number even though I set it to All?

I read this article: Expresso-store - Comma in quantity field

But I can't change the existing content in my database and also I need the data to be strings.

The version is 2.10.1

1
  • What version of EE? – Derek Hogue Jan 6 '16 at 14:49
1

"My database is full of the strings like this" - so you already have the values correctly stored in EE entries? Or are you referring to a different database?

"I set the fields Field Content to All." - this sounds like the problem, I'm guessing you have text formatting on with override on publish page and you're setting All on the publish page.

Go to Admin -> Channel Administration -> Channel Fields, then select the field group and then select the field in question "Field Content". You mentioned it's a Text input field:

field type set to text input

Scroll down till you see the Field Options:

Field Options

Select the Default Text Formatting option to None and the Allow override on publish page? to No. I have fields with these settings and it honours exactly what I've entered.

Still Issues? Check that you are using the native Text Input field, not a third party field, and that there's not an extension saving or parsing the data (Publisher, Better Workflow, etc). Best way to check is just disabling extensions and saving an entry again - checking the results in the database.

1
  • Unfortunately the text formatting isn active and it doesnt help to set it again. I am using Publisher. I got the data into the EE database with Importer. I ended up changing the commas to dots (.) which helps. – Rias Jan 7 '16 at 22:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.