1 .\" $NetBSD: form_field_opts.3,v 1.9 2004/11/24 11:57:09 blymn Exp $
4 .\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
6 .\" This code is donated to The NetBSD Foundation by the author.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
16 .\" 3. The name of the Author may not be used to endorse or promote
17 .\" products derived from this software without specific prior written
20 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
46 .Fn field_opts "FIELD *field"
48 .Fn field_opts_off "FIELD *field" "Form_Options options"
50 .Fn field_opts_on "FIELD *field" "Form_Options options"
52 .Fn set_field_opts "FIELD *field" "Form_Options options"
56 returns the current options settings for the given field.
59 will turn the options given in
61 off for the given field, options not specified in
63 will remain unchanged.
64 Conversely, the function
66 will turn on the options given in
68 for the specified field, again, any options not specified will remain
70 The options for a field may be set to a specific set of
71 options by calling the
74 Options may only be changed if the field given is not the
77 The following options are available for a field:
79 .Bl -tag -width O_REFORMAT -compact
81 The field is visible, hence is displayed when the form is posted.
83 The field is active in the form, meaning that it can be visited during
86 The contents of the field are echoed to the screen.
88 The contents of the field can be modified
90 The contents of the field are wrapped on a word boundary, if this
91 option is off then the field will be wrapped on a character boundary.
93 Blank the field on new data being entered if and only if the field
94 cursor is at the left hand side of the field.
96 Skip to the next field when the current field reaches its maximum
99 The field is allowed to contain no data
101 The field is not dynamic, it has a fixed size.
103 An unmodified field is allowed.
105 Retain the formatting of a field when the buffer is retrieved.
106 If this option is not set then the buffer returned will be a single string
108 When this option is set newline characters will be inserted at the point
109 where the string has been wrapped in a multiline field.
110 This option is an extension to the forms library and must not be used
114 man page for how this option modifies the behaviour of
118 The following options are on by default for a field:
131 Functions returning pointers will return
133 if an error is detected.
134 The functions that return an int will return one of the following error
137 .Bl -tag -width E_UNKNOWN_COMMAND -compact
139 The function was successful.
141 The field specified is the currently active one in the form.
149 automatically includes both
157 extension and must not be used in portable code.