I have altered the current date field to create a unique ID for a form. What I need it to do is to become READ ONLY once the user clicks the Submit button. Below is my current FormCalc code
$.rawValue = Concat(Num2Date(Date(), "MMDDYY"), "-", Num2Time(Time(), "hMMSS"))
Any ideas? THanks!
Solved! Go to Solution.
Hi,
put it into an if expression.
if ($.isNull) then
$ = Concat(Num2Date(Date(), "MMDDYY"), "-", Num2Time(Time(), "hMMSS"))
else
$.access = "readOnly"
endif
Hi,
put it into an if expression.
if ($.isNull) then
$ = Concat(Num2Date(Date(), "MMDDYY"), "-", Num2Time(Time(), "hMMSS"))
else
$.access = "readOnly"
endif
As a followup, how would I make a plain text field become read only once a value is entered and the field is exited?
Views
Replies
Total Likes
It's solution is similar.
Add this script to thr fields exit event.
if (not $.isNull) then
$.access = "readOnly"
endif
Is there a way to make it so that when the submit button is clicked it makes all form fields read only? Thanks!
Views
Replies
Total Likes
Hi,
you can use a recursive loop to find all field objects in your form.
Here's an example.
function lockFields(vNode) {
if (vNode.className == "field") {
vNode.access = "readOnly";
}
for (var i = 0; i < vNode.nodes.length; i += 1) {
lockFields(vNode.nodes.item(i));
}
}
lockFields(xfa.form);
Views
Likes
Replies
Views
Likes
Replies