1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
| <?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="fr" lang="fr"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<head>
<title>Mon premier Xforms</title>
<xf:model>
<xf:instance id="mon-instance">
<data xmlns="">
<date>2007-10-13</date>
<titre/>
<texte/>
</data>
</xf:instance>
<xf:bind nodeset="titre" constraint="string-length(.) > 0"/>
<xf:bind nodeset="texte" constraint="string-length(.) > 0"/>
<xf:bind nodeset="date" type="xsd:date"/>
<xf:submission action="blog.php" method="post" id="blog" replace="all"/>
</xf:model>
</head>
<body>
<p>
<xf:input ref="titre" incremental="true">
<xf:label>Titre</xf:label>
<xf:alert>Veuillez saisir un titre !</xf:alert>
<xf:hint>Le titre de votre article</xf:hint>
</xf:input>
</p>
<p>
<xf:textarea ref="texte">
<xf:label>Texte</xf:label>
<xf:alert>Veuillez saisir un texte !</xf:alert>
<xf:hint>Le corps de votre article</xf:hint>
</xf:textarea>
</p>
<p>
<xf:input ref="date" incremental="true">
<xf:label>Date</xf:label>
<xf:alert>Veuillez saisir une date !</xf:alert>
<xf:hint>La date de publication de votre article</xf:hint>
</xf:input>
</p>
<p>
<xf:submit submission="blog">
<xf:label>Envoyer</xf:label>
</xf:submit>
</p>
</body>
</html> |
Partager