{
    "content": [
        {
            "type": "text",
            "text": "# CGI::FormBuilder::Template::CGI_SSI (perldoc)\n\n## NAME\n\nCGI::FormBuilder::Template::CGISSI - FormBuilder interface to CGI::SSI\n\n## SYNOPSIS\n\nmy $form = CGI::FormBuilder->new(\nfields   => \\@fields,\ntemplate => {\ntype => 'CGISSI',\nfile => \"template.html\",\n},\n);\n\n## DESCRIPTION\n\nThis engine adapts FormBuilder to use \"CGI::SSI\".\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **TEMPLATES**\n- **SEE ALSO**\n- **REVISION**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "CGI::FormBuilder::Template::CGI_SSI",
        "section": "",
        "mode": "perldoc",
        "summary": "CGI::FormBuilder::Template::CGISSI - FormBuilder interface to CGI::SSI",
        "synopsis": "my $form = CGI::FormBuilder->new(\nfields   => \\@fields,\ntemplate => {\ntype => 'CGISSI',\nfile => \"template.html\",\n},\n);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 27,
                "subsections": []
            },
            {
                "name": "TEMPLATES",
                "lines": 65,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REVISION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "CGI::FormBuilder::Template::CGISSI - FormBuilder interface to CGI::SSI\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "my $form = CGI::FormBuilder->new(\nfields   => \\@fields,\ntemplate => {\ntype => 'CGISSI',\nfile => \"template.html\",\n},\n);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This engine adapts FormBuilder to use \"CGI::SSI\".\n\nYou can specify any options which \"CGI::SSI->new\" accepts by using a hashref:\n\nmy $form = CGI::FormBuilder->new(\nfields => \\@fields,\ntemplate => {\ntype => 'CGI::SSI',\nfile => 'form.shtml',\nsizefmt => 'abbrev'\n}\n);\n\nIn addition to CGI::SSI new arguments, you can also specify \"file\", \"virtual\", or \"string\"\nargument.\n\nThe following methods are provided (usually only used internally):\n\nengine\nReturns a reference to the \"CGI::SSI\" object\n\nprepare\nReturns a hash of all the fields ready to be rendered.\n\nrender\nUses the prepared hash and expands the template, returning a string of HTML.\n",
                "subsections": []
            },
            "TEMPLATES": {
                "content": "In your template, each of the form fields will correspond directly to a \"<!--#echo -->\" of the\nsame name prefixed with \"field-\" in the template. So, if you defined a field called \"email\",\nthen you would setup a variable called \"<!--#echo var=\"field-email\" -->\" in your template.\n\nIn addition, there are a couple special fields:\n\n<!--#echo var=\"js-head\" -->     -  JavaScript to stick in <head>\n<!--#echo var=\"form-title\" -->  -  The <title> of the HTML form\n<!--#echo var=\"form-start\" -->  -  Opening <form> tag and internal fields\n<!--#echo var=\"form-submit\" --> -  The submit button(s)\n<!--#echo var=\"form-reset\" -->  -  The reset button\n<!--#echo var=\"form-end\" -->    -  Just the closing </form> tag\n\nLet's look at an example \"form.html\" template we could use:\n\n<html>\n<head>\n<title>User Information</title>\n<!--#echo var=\"js-head\" --><!-- this holds the JavaScript code -->\n</head>\n<!--#echo var=\"form-start\" --><!-- this holds the initial form tag -->\n<h3>User Information</h3>\nPlease fill out the following information:\n<!-- each of these <!--#echo -->'s corresponds to a field -->\n<p>Your full name: <!--#echo var=\"field-name\" -->\n<p>Your email address: <!--#echo var=\"field-email\" -->\n<p>Choose a password: <!--#echo var=\"field-password\" -->\n<p>Please confirm it: <!--#echo var=\"field-confirmpassword-->\n<p>Your home zipcode: <!--#echo var=\"field-zipcode -->\n<p>\n<!--#echo var=\"form-submit\" --><!-- this holds the form submit button -->\n</form><!-- can also use \"tmplvar form-end\", same thing -->\n\nAs you see, you get a \"<!--#echo -->\" for each for field you define.\n\nHowever, you may want even more control. That is, maybe you want to specify every nitty-gritty\ndetail of your input fields, and just want this module to take care of the statefulness of the\nvalues. This is no problem, since this module also provides several other \"<tmplvar>\" tags as\nwell:\n\n<!--#echo var=\"value-[field] -->   - The value of a given field\n<!--#echo var=\"label-[field] -->   - The human-readable label\n<!--#echo var=\"comment-[field] --> - Any optional comment\n<!--#echo var=\"error-[field] -->   - Error text if validation fails\n<!--#echo var=\"required-[field] --> - See if the field is required\n\nThis means you could say something like this in your template:\n\n<!--#echo var=\"label-email\" -->:\n<input type=\"text\" name=\"email\" value=\"<!--#echo var=\"value-email\" -->\">\n<font size=\"-1\"><i><!--#echo var=\"error-email\" --></i></font>\n\nAnd FormBuilder would take care of the value stickiness for you, while you have control over the\nspecifics of the \"<input>\" tag. A sample expansion may create HTML like the following:\n\nEmail:\n<input type=\"text\" name=\"email\" value=\"nate@wiger.org\">\n<font size=\"-1\"><i>You must enter a valid value</i></font>\n\nNote, though, that this will only get the *first* value in the case of a multi-value parameter\n(for example, a multi-select list). Multiple values (loops) in \"CGISSI\" are not yet\nimplemented.\n\nFor more information on templates, see HTML::Template.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "CGI::FormBuilder, CGI::FormBuilder::Template, HTML::Template\n",
                "subsections": []
            },
            "REVISION": {
                "content": "$Id: HTML.pm 97 2007-02-06 17:10:39Z nwiger $\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Copyright (c) Nate Wiger <http://nateware.com>. All Rights Reserved.\n\nThis module is free software; you may copy this under the terms of the GNU General Public\nLicense, or the Artistic License, copies of which should have accompanied your Perl kit.\n",
                "subsections": []
            }
        }
    }
}