Skip to main content
This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
August 12, 2023

- What do you mean by that, exactly? Do you want the user to fill in ALL form fields before the button is enabled?

- Not possible. You can spaces or even tabs (using a script) to the items in the list, though.

Alizai
AlizaiAuthor
Participating Frequently
August 13, 2023

Yes sir, I want the user to fill in all form fields before the button is enabled,

try67
Community Expert
Community Expert
August 13, 2023

You can do it using this code as the custom calculation script of one of the text fields in your file:

 

var allFilled = true;
for (var i=0; i<this.numFields; i++) {
	var fname = this.getNthFieldName(i);
	var f = this.getField(fname);
	if (f==null) continue;
	if (f.type=="button") continue;
	if (f.valueAsString==f.defaultValue) {
		allFilled = false;
		break;
	}
}
this.getField("PrintButton").readonly = !allFilled;