AnsweredAssumed Answered

How do you create a trigger to run a javascript in an xls form?

Question asked by kbhancock_usfs on Aug 13, 2020
Latest reply on Sep 4, 2020 by kbhancock_usfs

Hi,

 

I have form that runs a custom javascript function to calculate the number of records based on a selection and value entered outside of a repeat. The javascript works as expected but it seems to run whenever a new repeat is added, creating inefficiencies with data entry in the field; each new repeat record takes up to 4 seconds to load. Is there a way to set a trigger in a javascript function, so it runs only when values from two fields are changed outside a repeat? I found the javascript .change method but I am not sure the proper syntax to implement it in Survey123? Can anyone help with this? Thank you.

Outcomes