Copy link to clipboard
Copied
I would like to apologize in advance, I'm not very comfortable with Java. Perhaps you all can help me come up with a solution to the form I am working on.
My form is for samples. I've been using a fillable field for the first sample, then every sample thereafter calculates +1. I would like to have the form stay empty and NOT autofill if we don't have enough samples to fill every row in the form. I've considered doing an if then statement in a dropdown, where the sample ID has a prefix in a dropdown. If the prefix is "A", the sample ID is +1. If the prefix is "N/A", the sample ID field is blank. I can get the "A" to work, but not the "N/A".
Another idea was maybe a button called "END" that is visible but doesn't print. Pressing "END" would hide all following fields, and pressing it again would show them again. I can get it to hide the fields, but pressing it again doesn't show them again.
Thanks in advance for all your help,
Ali
Copy link to clipboard
Copied
Hi,
Can you share the code you are using and we can then help by pointing out the issues.
Copy link to clipboard
Copied
Here is example how to show/hide fields with a button:
as 'Mouse UP' event of a button select 'Run a JavaScript' and add this code:
this.getField("Text1").display = this.getField("Text1").display == display.visible ? display.hidden : display.visible;
this.getField("Text2").display = this.getField("Text2").display == display.visible ? display.hidden : display.visible;
Thats example for two fields "Text1" and "Text2", you can replicate line to add more fields,change field names to your actual names.