How to nullify all fields on one page?

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

azaleas
Ebase User
Posts: 81
Joined: Thu Jul 30, 2015 12:44 pm

How to nullify all fields on one page?

#1

Postby azaleas » Thu Aug 06, 2015 11:44 am

Is there a way to clear the fields on one page at once rather than using

fields.Field_name.value = null;

each time?[/b]
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Thu Aug 06, 2015 12:03 pm

Try this - clears all fields on the current page:

Code: Select all

for each (var ctrl in form.currentPage.allControls)
{
	if (ctrl.field)
	{
		ctrl.field.value = null;
	}
}
0 x


Who is online

Users browsing this forum: No registered users and 13 guests