Copy link to clipboard
Copied
I have created a fillable form with Javascript so the selection from a dropdown box will auto fill a text box with text that can then be edited by the user. There are two of these dropdowns on the page. Dropdown1 autofills text1 and Dropdown2 autofills text2. The problem I am having is when the text in textbox1 is edited, and then the dropdown2 is selected, the edited changes in text1 are deleted.
The fillable form will be used in a doctor's office for charting. When a diagnosis is selected from dropdown1, it will autofill a generic narrative in text1. That text needs slight edits, such as the patient's gender and age. Everything works fine, until the dropdown2 box is selected, then the edited text in text1 reverts back to the original text from the Javascript.
How do I make the edits in text1 permanent so they are not deleted when dropdown2 is selected?
Hopefully I have explained this problem well enough... I have attached the document for reference.
Copy link to clipboard
Copied
This is because you're using the Calculation trigger in the dropdowns, which is triggered each time a field in the document loses focus (on blur).
You must use the Custom Key Format instead.
See attachment.
Copy link to clipboard
Copied
Calculations run EVERY time ANY field value changes. Move your scripts to the validation tab (Run a custom validation script) instead.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thank you.
Copy link to clipboard
Copied
Calculations run EVERY time ANY field value changes. Move your scripts to the validation tab (Run a custom validation script) instead.
Copy link to clipboard
Copied
Thank you. I was pulling my hair out!