Form Definition Files

Form Definition Files

Instead of writing VCV applications that need to parse a whole website, only for collecting the information about the XHTML form, you can also put the required VCV tags into a so-called Form Definition File. These XML files are very simple and contain only VCV tags inside XHTML's form tag:

        <?xml version="1.0" ?>
        <form xmlns="";
                <input type="text" name="name" maxlength="20" vcv:minlength="4" />
                <input type="password" name="pwd" maxlength="20" vcv:minlength="5" />
                <vcv:choose-multiple name="multi" values-of="array" />
                <!-- add here other form elements you like to -->

The Form Definition Files do not have to put at the same location as the originating XHTML page, to make it hardly possible obtaining information about the data types VCV expects. If you want or have to store the files at the same location as the XHTML pages, you can protect them by giving names like .ht.my_php_page.form; VCV does not require a certain file prefix or suffix.

Another advantage of these files is that only the Form Definition Files have to be valid XML code, your web pages not. This is very interesting if you want to ``ugrade'' your web site with VCV without changing all web forms.

If you want to use VCV for checking data submitted by the HTTP GET method, Form Definition Files are the only way you can tell VCV about the required input data.


This document: $Id: form-def-files.pod,v 1.1 2005/07/22 16:28:02 robertbienert Exp $

See for the latest revision.

 Form Definition Files