GString *str;
+ GValue *val;
+ gchar *filename;
+
ZakCgiForm *form;
ZakCgiFormElement *element;
"<body>\n"
"<div class=\"container\">\n");
+ val = zak_cgi_main_get_parameter (zakcgimain, "filename");
+ filename = (gchar *)g_value_get_string (val);
+
form = zak_cgi_form_new (zakcgimain,
"method", "post",
- "action", "form",
+ "action", g_strdup_printf ("form_xml?filename=%s", filename),
NULL);
- GValue *val = zak_cgi_main_get_parameter (zakcgimain, "filename");
- if (zak_form_form_load_from_file (ZAK_FORM_FORM (form), g_value_get_string (val)))
+ if (zak_form_form_load_from_file (ZAK_FORM_FORM (form), filename))
{
if (zak_cgi_main_is_post (zakcgimain))
{
<element type="zak_cgi_form_element_text">
<id>first</id>
<label>The Label for first</label>
+ <filter type="zak_form_element_filter_trim"></filter>
+ <validator type="zak_form_element_validator_regex">^blahblahblah$</validator>
</element>
<element type="zak_cgi_form_element_check">