If the file will be used in Reader, then no. The closest you can get to it
is to make them readonly.
Use the getNthFieldName method to get all the fields names, loop over them,
and set their readonly property to true.
So once the form is submitted the script makes the fields readonly? Do you have a small example of how to do that? I'm sorry I've never used that script before. Thanks for your help!
for (var i = 0; i < this.numFields; i++)
this.getField(this.getNthFieldName(i)).readonly = true;
Be aware that this will make the fields read-only even if the submit failed.
If you want to change that, you will need to submit the file using
So I need to incorporate the script you gave me with this script that I'm already using?
Yes, just add it afterwards.
Ok, that is exactly what I needed. But how can I alter the script to make it only apply to certain fields? For example half of the form can be edited but the second half needs to be read-only once its submitted. So how do I write the script to tell it individual fields that need to be read only? Sorry for the questions, I'm still pretty new to scripting.
You need to define an array with the names of the fields to lock, and then
loop over it.
Or, for example, if you want to lock all the fields on page 1, then you can
use the current code, but add a check that looks at the page property before
locking the field.