Hello all,
I am working on a generic (php) script to produce (X)HTML Forms through XML
and XSL based on field-definitions stored in a database.
The basic way i did HTML-forms in PHP was like this:
http://212.204.203.71/test/simpleform/simpleform.php
source: http://212.204.203.71/test/syntax/simpleform.php
This basic form is validated when it is submitted to itself... if validation
fails then an error message is created and displayed on the page...otherwise
validation is ok and we can do some inserting in the database and/or
redirect to another page. Remark: the fields that are filled will be
automaically filled in if the page is submitted to itself (that will be my
problem in the XML/XSL version of this script).
Now we go over to the XML/XSL version of the script above: I therefore
created an XML file (holding the field definitions) see:
http://212.204.203.71/test/xmlform/form.xml
And further i created an XSL file to transform the XML file into a HTML
form. see: http://212.204.203.71/test/xmlform/form.xsl
Then i used a file form.php to put the XML and XSL together using some PHP
xslt functions: http://212.204.203.71/test/xmlform/form.php
source: http://212.204.203.71/test/syntax/form.php
This all works fine but now the problem. I am looking for a concept of how
to get the formfields filled in again after submitting the form because in
XSL this is not as easy as with my basic form. I tried to send firstname and
lastname as parameters in the function call and to put them as parameters in
the xsl file but that does not work and it is not ok at all because my
intention was to build a generic script....
Hope you see my problem as it is hard to explain.
Regards,
Jochem (jo***********@REMOVETHISANTISPAMquicknet.nl)