1.6

Table Of Contents
Getting the status of unchecked checkboxes and radio buttons
Unchecked checkboxes and radio buttons are not submitted (as per standard HTML behavior),
so how to get the state of those checkboxes and radio buttons? A common approach to get the
state of unchecked checkboxes and radio buttons is to add a hidden field to the Form with the
same name as the checkbox or radio button, for example:
<input type="hidden" name="status_1" value="0" />
<input type="checkbox" id="status_1" name="status_1" value="1" />
When multiple fields with the same name are encountered, the previous value is overwritten.
This way the values for unchecked checkboxes and radio buttons can be processed easily.
Using JavaScript
JavaScript files, libraries and frameworks can be added to a template, primarily for use in Web
pages and Capture OnTheGo Forms. Before doing this, you need to choose which kind of
library or framework you want to work with, depending on the type of features you really desire.
For a bit of help with that and a few examples, see this how-to: Using external libraries.
Adding JavaScript files to the resources
To add a JavaScript file to the resources:
l
Right-click the Javascript folder on the Resources pane, and click New Javascript.
Double-click it to open and edit it.
l Alternatively, drag and drop the JavaScript file from the Windows Explorer to the
JavaScript folder on the Resources pane.
Next, include it in a Web page; see below.
Adding a remote JavaScript file
A Remote Javascript Resource is a file that is not located within your template but is hosted on
an external web server (generally called a CDN). When generating Web output, these files are
referenced in the web page's header and are served by the remote server, not by the Connect
Server module.
There are a few advantages to using remote resources:
Page 355