Creating, Modifying, Troubleshooting Fields for Web Clients

Currently 17 different data types can be assigned to a field in Notes. Not all are supported or work exactly the same on the Web. Comparisons of the HTML and Domino field types are listed in Table 14.2.

Table 14.2. Domino Field Types and HTML Equivalents
Domino Field TypeHTML Equivalent
Text, Date/Time, Number, Authors, Names, ReadersInput (text)
Dialog list, Listbox, Combobox, Time zoneSelect
Check boxCheck box
Radio buttonRadio
Rich Text, Rich Text LiteText area
PasswordPassword
NoneHidden
Formula, ColorNone

Rich Text fields are translated as a multirow text box. If the functionality of Rich Text is needed, you can display Rich Text as a Java Applet. This option is set in the Field Properties, Basic tab under the Web Access section.

Dialog list, Combobox, and Listbox all display on the Web as a Combobox does in Notes.

Using the Allow Values Not in List setting on a Dialog list field works well in Notes, but on the Web it translates to an empty text box. If users need to add choices to a Dialog list field on the Web, the design requires two fields—one in which users can enter new values and a second to display the list. Also, if the page is being accessed from both clients, these field values must be synchronized with three fields—one for Notes and two for Web—and each version must be hidden from the other client. You can accomplish all of these requirements by using a computed subform or by using hidden fields.

If you choose the former method, you can create two subforms—one with the single field needed for Notes and the other with the two fields needed for the Web. Insert the subform with a formula, using @ClientType to ascertain which client is accessing the form. @ClientType returns Notes or Web, depending on the client.

Another option is to use the Hide paragraph from attribute on the Field Properties box, as shown in Figure 14.4.

Figure 14.4. Field property box.


The Paragraph Hide When property makes it very easy to hide design elements from one client or the other. Bear in mind, though, that hidden fields are handled differently in each client. Notes hides the field from the user, but the value is maintained in the document and can be used in formulas or views and seen through the Document Properties.

Hidden fields on the Web can be maintained in the document, used in formulas or views, and seen through View, Source. Hidden fields on the Web can also be ignored by Domino before they are rendered to the Web; these fields will be unavailable for use with JavaScript. These characteristics are determined by settings in the Form Properties shown in Figure 14.5.

Figure 14.5. Form Property Box.


Selecting Generate HTML for All Fields on the Default tab in the On Web Access section makes this a Web-hidden datatype and maintains the value to be used by JavaScript. If this option is not selected, the Field and its value are not rendered to the Web.

Hidden fields generated by selecting the Generate HTML For All Fields Option in the Form property dialog box are not secure. Their names and values are translated to the Web and can be seen through View, Source with a <type=hidden> HTML tag.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.7.117