Skip to main content
Participant
March 27, 2024
Question

Manual Entry In Calculations Field

  • March 27, 2024
  • 1 reply
  • 440 views

Hello,

It's been a while since I've done a custom script and need help. 

 

I have a calculations field on a form adding 7 different entries (Contact Duration in Hrs 1, Contact Duration in Hrs 2, . . . Contact Duration in Hrs 7). Sometimes the user has to use two forms because they made over 7 contact. Therefore I want to be able to also add a manual entry option since this form can't automatically add up the values from another document.

 

I'm looking for something like: if the manual field of 'Total Hours Manual' is blank then display the calculation field 'Total Hours Auto'

- if there is a manual entry then the automatic calculation field should be hidden behind the manual entry

- if there is not a manual entry then the automatic calculation should be visable

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
March 27, 2024

You can use this as 'Validation' script of 'Total Hours Manual' field:

this.getField("Total Hours Auto").display = (event.value != "") ? 1:0;