Announcement

Collapse
No announcement yet.

How to change number format in form

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to change number format in form

    Hello,
    I created a form with calculated fields. I applied the required number format but "0.00" shows by default on my blank form.
    Is there a way to change the number format in order to prevent "0.00" from showing?
    I tried to customise the format but I'm not good with JS...
    Many thanks,
    D


  • #2
    Diane

    You can change the number format in the text field properties dialog box as the below screenshot. To enable the properties dialog box, you can click on Form>Text Field, click on the field and right click. Please note, when a text field contains calculation, the sample for the value will be displayed by default, it indicates that the field is auto filled.


    Attached Files

    Comment


    • #3
      Thanks Lyndi_wu,
      I was hoping to find a way to avoid the default display. Through your reply, I assume there isn't a way to avoid having the "0.00" default value?

      Comment


      • #4
        Diane To avoiding "0.00" and let it as blank can be accomplished by Javascript. Can you please check attached demo file and try? (Please go to Form>Javascript to see detailed scripts.) Thanks.
        Attached Files

        Comment


        • #5
          Place this script as a Custom Format Script in the calculated field:

          if (event.value == 0) {event.value = ""};

          Comment


          • #6
            Thanks Lyndi_wu, mobdro
            Last edited by wadhvakartik22; 01-25-2022, 05:49 AM.

            Comment

            Working...
            X