3 <meta name="generator" content="groff -Thtml, see www.gnu.org">
4 <meta name="Content-Style" content="text/css">
5 <title>new_ml_form</title>
9 <h1 align=center>new_ml_form</h1>
10 <a href="#NAME">NAME</a><br>
11 <a href="#SYNOPSIS">SYNOPSIS</a><br>
12 <a href="#DESCRIPTION">DESCRIPTION</a><br>
13 <a href="#AUTHOR">AUTHOR</a><br>
14 <a href="#LICENSE">LICENSE</a><br>
15 <a href="#VERSION">VERSION</a><br>
16 <a href="#SEE ALSO">SEE ALSO</a><br>
19 <!-- Creator : groff version 1.17.2 -->
20 <!-- CreationDate: Sat Aug 31 18:06:10 2002 -->
23 <table width="100%" border=0 rules="none" frame="void"
24 cols="2" cellspacing="0" cellpadding="0">
25 <tr valign="top" align="left">
26 <td width="10%"></td><td width="90%">
27 new_ml_form - monolith form widget</td></table>
28 <a name="SYNOPSIS"></a>
31 <table width="100%" border=0 rules="none" frame="void"
32 cols="2" cellspacing="0" cellpadding="0">
33 <tr valign="top" align="left">
34 <td width="10%"></td><td width="90%">
35 <pre><b>#include <ml_form.h>
37 ml_form new_ml_form (pool pool);
38 </b></pre></td></table>
39 <a name="DESCRIPTION"></a>
42 <table width="100%" border=0 rules="none" frame="void"
43 cols="2" cellspacing="0" cellpadding="0">
44 <tr valign="top" align="left">
45 <td width="10%"></td><td width="90%">
46 A monolith form widget is a low-level widget for handling
47 input of text fields, check buttons, radio buttons and so
48 on, collected together into a single form on a
51 <table width="100%" border=0 rules="none" frame="void"
52 cols="2" cellspacing="0" cellpadding="0">
53 <tr valign="top" align="left">
54 <td width="10%"></td><td width="90%">
55 A form should contain a mixture of input widgets and
56 ordinary widgets. Since the form widget itself can only be
57 packed with a single widget, normally you would pack a
58 layout widget directly into the form, and then a mixture of
59 labels and input widgets into the layout
62 <table width="100%" border=0 rules="none" frame="void"
63 cols="2" cellspacing="0" cellpadding="0">
64 <tr valign="top" align="left">
65 <td width="10%"></td><td width="90%">
66 One or more of the widgets packed into the form can be a
67 submit button (see <b>new_ml_form_submit(3)</b>). Pressing
68 on the submit button causes the form's callback function to
69 be called, and in this function the values entered into the
70 other input widgets can be read. It is recommended that all
71 forms contain at least one submit button, because the effect
72 of creating a form with no submit buttons is
73 browser-dependent, and can mean that the form cannot be
74 submitted.</td></table>
76 <table width="100%" border=0 rules="none" frame="void"
77 cols="2" cellspacing="0" cellpadding="0">
78 <tr valign="top" align="left">
79 <td width="10%"></td><td width="90%">
80 Forms cannot be nested (a form widget cannot contain another
81 form widget inside itself). This is a limitation of
84 <table width="100%" border=0 rules="none" frame="void"
85 cols="2" cellspacing="0" cellpadding="0">
86 <tr valign="top" align="left">
87 <td width="10%"></td><td width="90%">
88 Forms are low-level entities. To do seriously interesting
89 things with forms such as self-validation, use one of the
90 higher-level form-type abstractions that monolith provides
91 (XXX will provide, not now - RWMJ).</td></table>
93 <table width="100%" border=0 rules="none" frame="void"
94 cols="2" cellspacing="0" cellpadding="0">
95 <tr valign="top" align="left">
96 <td width="10%"></td><td width="90%">
97 <b>new_ml_form</b> creates a new form widget.</td></table>
99 <table width="100%" border=0 rules="none" frame="void"
100 cols="2" cellspacing="0" cellpadding="0">
101 <tr valign="top" align="left">
102 <td width="10%"></td><td width="90%">
103 <b>ml_form_set_callback</b> sets the callback function which
104 is called when the form is submitted. The callback function
105 is invoked as <b>void callback_fn (ml_session session, void
106 *data)</b>. The values that the user entered in the input
107 fields are available by calling (for example)
108 <b>ml_form_input_get_value(3)</b> on each input widget
109 within the form.</td></table>
111 <table width="100%" border=0 rules="none" frame="void"
112 cols="2" cellspacing="0" cellpadding="0">
113 <tr valign="top" align="left">
114 <td width="10%"></td><td width="90%">
115 <b>ml_form_pack</b> packs a widget into the form. A form can
116 only store a single widget, so if you call pack subsequent
117 times, the earlier widgets are forgotten.</td></table>
118 <a name="AUTHOR"></a>
121 <table width="100%" border=0 rules="none" frame="void"
122 cols="2" cellspacing="0" cellpadding="0">
123 <tr valign="top" align="left">
124 <td width="10%"></td><td width="90%">
125 Richard Jones <rich@annexia.org></td></table>
126 <a name="LICENSE"></a>
129 <table width="100%" border=0 rules="none" frame="void"
130 cols="2" cellspacing="0" cellpadding="0">
131 <tr valign="top" align="left">
132 <td width="10%"></td><td width="90%">
133 GNU LGPL (see http://www.gnu.org/)</td></table>
134 <a name="VERSION"></a>
137 <table width="100%" border=0 rules="none" frame="void"
138 cols="2" cellspacing="0" cellpadding="0">
139 <tr valign="top" align="left">
140 <td width="10%"></td><td width="90%">
141 monolith-1.0.0</td></table>
142 <a name="SEE ALSO"></a>
145 <table width="100%" border=0 rules="none" frame="void"
146 cols="2" cellspacing="0" cellpadding="0">
147 <tr valign="top" align="left">
148 <td width="10%"></td><td width="90%">
149 <b>new_ml_form_input(3)</b>, <b>new_ml_form_textarea(3)</b>,
150 <b>new_ml_form_submit(3)</b>.</td></table>