Expand my Community achievements bar.

SOLVED

Decimal values in Numberfield?

Avatar

Level 2

I'm trying to use a Coral Numberfield, but it marks a decimal value as invalid and there doesn't seem to be any option to allow it. Is there something I'm missing?

1 Accepted Solution

Avatar

Correct answer by
Administrator

Hi 

You can use TypeHints for the same. Add a hidden field (xtype:hidden) with name = <numberField'sName>@TypeHint and value= Long (http://stackoverflow.com/questions/28467498/save-cq-component-field-value-as-long-instead-of-string).

Also please have at article mentioned by "Leeasling" :- http://blogs.adobe.com/livecycle/2011/12/beyond-string-typehint-to-rescue.html

I hope this would act as some help to you.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

View solution in original post

5 Replies

Avatar

Level 2

Yup, that's it. The old numberfield has a bunch of options but they don't seem to carry over to the new one.

Avatar

Level 10
Have you tried to write a custom type that let's you use decimal values. I am thinking there may be a way to write custom script to solve this. 

Avatar

Correct answer by
Administrator

Hi 

You can use TypeHints for the same. Add a hidden field (xtype:hidden) with name = <numberField'sName>@TypeHint and value= Long (http://stackoverflow.com/questions/28467498/save-cq-component-field-value-as-long-instead-of-string).

Also please have at article mentioned by "Leeasling" :- http://blogs.adobe.com/livecycle/2011/12/beyond-string-typehint-to-rescue.html

I hope this would act as some help to you.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni