Hi,
we created a form for a client that their auditors are simply downloading, completing and submitting back to the client via form upload. the fowm contains dropdon fields and text areas. the client then needs to send the form to a third party. The form needs to be locked so no amendments can be made. The client has tried combining the form with an additional pdf, but the text areas then do not show overflow, the "+" appears in bottom right corner but can not be clicked to expand. Can someone help/advise the solution please...doing our heads in now....
Views
Replies
Total Likes
Hi,
There is a LoclAllFields solution, but when the fields are readOnly you will not be able to access data below the bounds of the field (not visible).
I have a form on our website that was developed a few years ago: http://www.assurehsc.ie/files/2007-08-31_Designer_Risk_Assessments_Example-1.pdf
It is intended as a sample/information/instruction tool. Because it is up on the web I wanted visitors to explore the look and feel, but not to download an use at will. So the fields are set to 'open', but the initial value is read on the enter event, stored and then on exit the original value is restored.
This is a solution from the forum (Stefan, I think). If you insert a script object called 'Utils', with the following javascript:
var sOriginalValue = "";
Then in the fields enter event:
Utils.sOriginalValue = this.rawValue; // store original value into script object variable
And in the fields exit event:
this.rawValue = Utils.sOriginalValue; // restore original value from script object variable
Utils.sOriginalValue = ""; // reset saved value
This solution runs all the time. In your case you would need a flag to track if the script it to run or not, eg turning on and off the feature.
Hope that helps,
Niall
Views
Replies
Total Likes
Thanks for taking the time to post your advice - do you have to add a variable per field, then exit and enter events per field also?
Views
Replies
Total Likes
Hi,
You could go for a global variable (File > Form Properties > Variables tab), called 'locked' and set it to 0 initially (eg not locked).
Also you would need to make sure that the defaults are set to 'Automatically save script changes' in the File > Form Properties > Defaults tab.
You could leave the script object as it is AND you could leave the enter event script as is.
The only thing to change would be to wrap the exit event script in an if statement to check the status of the global variable.
if(locked.value == 1) // form is locked
{
this.rawValue = Utils.sOriginalValue; // restore original value from script object variable
Utils.sOriginalValue = ""; // reset saved value
}
Your locking script would then change the global variable to 1, which will allow the protection of the field.
A couple of things to note:
Hope that helps,
Niall
PS, Yes, in our current setup there are enter and exit scripts in each of the fields.
Views
Replies
Total Likes
fantastic...you help is very much appreciated!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies