Skip to main content
Participant
July 28, 2020
Question

Adobe form - Adding number sign and make text only visible if text is in calculated field

  • July 28, 2020
  • 1 reply
  • 806 views

Hi All

 

I am composing a Quote form that has mutipal form fields.

Part number, Description, Qty, Unit Price, and Total.  I have a calculate value where Qty x Price = Total.

 

I want a number sign ($) in the total field, and i only want the field to be visible if there is a value in the Qty and Price Fields.

 

I found a Custom sctipt that woud make the field only visible if the Qty and unit price had numbers in them, but that cancles out the Number sign.

 

Is there a way to add the number sign and only have it visable if the Qty and Unit price are filled?

 

Thanks for you help

 

Andrew

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
July 28, 2020

All you need to do is set the field as empty if the result is zero.

Add this code as its custom validation script to achieve that:

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

Participant
July 29, 2020

try67,

 

When you do that it takes away the number sign ($).

To add the number sign go under  Format, "Select format category" then number.  To add the Script you go to Format, "Select format category" then Custom then Custom format Script.  It is either 1 or the other.

 

Is there a way to have both?

 

Thanks,

 

Andrew

try67
Community Expert
Community Expert
July 29, 2020

Read my reply more carefully, please. This code is not to be used as the Format script, and should not interfere with it.