Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Decimal value with number field failing for specific value

Avatar

Level 2

Hi Team,

 

In my cq:dialog I have a field with following details:

<answerScore jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/numberfield"
fieldDescription="Select Score value for this Answer."
fieldLabel="Answer Score" name="./answerScore"
required="{Boolean}true"
min="{Double}-1"
max="{Double}10"
step="{Double}0.0001"/>

 It works fine for most of the values but fails for value 2.05. Is there anything I am doing wrong?

Thanks in advance!!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@Volga_Dharam_Rakshika 

Even I see issue using granite/ui/components/coral/foundation/form/numberfield, working as expected using  granite/ui/components/foundation/form/numberfield. Give a try.

View solution in original post

9 Replies
Hi @Asutosh_Jena_, with using any I don't have control over any decimal places which is basically my requirement.

Avatar

Community Advisor

@Volga_Dharam_Rakshika 
That's an issue with the coral 3 number field. So you might need to go with granite number field for now to resolve the issue.

granite/ui/components/foundation/form/numberfield

 

Thanks!

Avatar

Correct answer by
Community Advisor

@Volga_Dharam_Rakshika 

Even I see issue using granite/ui/components/coral/foundation/form/numberfield, working as expected using  granite/ui/components/foundation/form/numberfield. Give a try.

@Anudeep_Garnepudi this works but the error message is quite difficult to read in case of error, any help on that?