Login   Register  
PHP Classes
elePHPant
Icontem

File: jsrs-adr-php/adr-form.xml

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of yo keller  >  metaForm  >  jsrs-adr-php/adr-form.xml  >  Download  
File: jsrs-adr-php/adr-form.xml
Role: Auxiliary data
Content type: text/plain
Description: form xml configuration file
Class: metaForm
Generate and validate forms from XML definitions
Author: By
Last change: illustrate the multiselect-file type
Date: 9 years ago
Size: 6,698 bytes
 

Contents

Class file image Download
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--

THIS FILE DESCRIBES THE DATA TO BE EDITED
THE TAG NAMES SHOULD BE FAIRLY SELF EXPLANATORY 

FORM TYPES SUPPORTED:
  TEXT:	Text input field
  TEXTAREA:	Textarea input field
  SELECT:	Selection list
  MULTISELECT:	Multiple selection list
  CHECKBOX:	Checkboxes
  RADIO:	Radio buttons
  HIDDEN:	hidden input field + no data display (no data entry)
  CMT:		hidden input field + data display (no data entry)
  BUTTON:	action button, separate from submit buttons(s)	
  SELECT-FILE:	Selection list kept in a file
  MULTISELECT-FILE:	Multiple selection list kept in a file

-->

<form-config>
  <var name="id" type="cmt"> <!-- NAME FOR FORM FIELD AND INPUT TYPE -->
    <description>numéro d'enregistrement</description>
    <html-display-option name="size" value="10"/>
    <html-display-option name="maxlength" value="10"/>
    <html-display-option name="value" value=""/>
    <validation-regexp>/^[\d|\s]*$/</validation-regexp>
    <validation-message>créé automatiquement par la base de données</validation-message>
  </var>

  <var name="tble" type="hidden"> <!-- NAME FOR FORM FIELD AND INPUT TYPE -->
    <description>table</description>
    <html-display-option name="size" value="70"/>
    <html-display-option name="maxlength" value="70"/>
    <html-display-option name="value" value="adresse"/>
    <validation-regexp>/^\D.+$/</validation-regexp>
    <validation-message>nom de la table</validation-message>
  </var>
  
  <var name="aux_designations" type="text"> <!-- NAME FOR FORM FIELD AND INPUT TYPE -->
    <description>autres désignations</description>
    <html-display-option name="size" value="70"/>
    <html-display-option name="maxlength" value="70"/>
    <html-display-option name="value" value=""/>
    <validation-regexp>/^\D.+$/</validation-regexp>
    <validation-message>saisir autres désignations, par ex: chez, c/o, ....</validation-message>
  </var>


  <var name="numero" type="text"> <!-- NAME FOR FORM FIELD AND INPUT TYPE -->
    <description>numero</description>
    <html-display-option name="size" value="5"/>
    <html-display-option name="maxlength" value="5"/>
    <html-display-option name="value" value=""/>
    <validation-regexp>/^([\d|\s]*)$/</validation-regexp>
    <validation-exp>matches[1] .lt. 1000</validation-exp>
    <validation-message>numéro  dans la rue (seuls des nombres sont autorisés).</validation-message>
  </var>
<!-- NAME FOR FORM FIELD AND INPUT TYPE -->
<!--
  <var name="mkform" type="file"> 
    <description>Form data file (form_data.inc.php)</description>
    <html-display-option name="size" value="70"/>
    <html-display-option name="maxlength" value="225"/>
    <html-display-option name="value" value="http://kepler/MkFormGen/php_archives_docs-new/individu"/>
    <validation-regexp>/^\D+$/</validation-regexp>
    <validation-message>select a file - provide its url.</validation-message>
  </var>
-->
<!-- NAME FOR FORM FIELD AND INPUT TYPE -->
  <var name="lieu_dit" type="text">
    <description>lieu dit</description>
    <html-display-option name="size" value="70"/>
    <html-display-option name="maxlength" value="70"/>
    <html-display-option name="value" value="individu"/>
    <validation-regexp>/^\D.+$/</validation-regexp>
    <validation-message>Saisir le nom du lieu-dit (hameau, quartier, résidence, ...) .</validation-message>
  </var>
 <!-- NAME FOR FORM FIELD AND INPUT TYPE -->
  <var name="rue" type="text">
    <description>rue</description>
    <html-display-option name="size" value="70"/>
    <html-display-option name="maxlength" value="70"/>
    <html-display-option name="value" value=""/>
    <validation-regexp>/^\D.+$/</validation-regexp>
    <validation-message>Saisir le nom de la rue (boulevard, chemin, allée, ...).</validation-message>
  </var>

  <var name="commune" type="text"> <!-- NAME FOR FORM FIELD AND INPUT TYPE -->
    <description>commune</description>
    <html-display-option name="size" value="70"/>
    <html-display-option name="maxlength" value="70"/>
    <html-display-option name="value" value=""/>
    <validation-regexp>/^\D.+$/</validation-regexp>
    <validation-message>Saisir le nom de la commune.</validation-message>
  </var>

  <var name="code" type="text"> <!-- NAME FOR FORM FIELD AND INPUT TYPE -->
    <description>code postal</description>
    <html-display-option name="size" value="40"/>
    <html-display-option name="maxlength" value="20"/>
    <html-display-option name="value" value=""/>
    <validation-regexp>/^[\d|\s]*$/</validation-regexp>
    <validation-message>seuls des nombres sont permis.</validation-message>
  </var>
  
  <var name="departement" type="text"> <!-- NAME FOR FORM FIELD AND INPUT TYPE -->
    <description>departement</description>
    <html-display-option name="size" value="70"/>
    <html-display-option name="maxlength" value="70"/>
    <html-display-option name="value" value="individu"/>
    <validation-regexp>/^\D.+$/</validation-regexp>
    <validation-message>Saisir le nom du département.</validation-message>
  </var>

  <var name="pays" type="select-file"> <!-- NAME FOR FORM FIELD AND INPUT TYPE -->
    <description>Selectionner pays</description>
    <html-display-option name="size" value="5"/>
    <html-display-option name="maxlength" value="70"/>
    <file>pays.txt</file>
    <validation-regexp>/1/</validation-regexp>
    <validation-message>Sélectionner un pays.</validation-message>
  </var>
 
  <var name="type_lieu" type="multiselect-file"> <!-- NAME FOR FORM FIELD AND INPUT TYPE -->
    <description>Selectionner le (ou les) type(s) de lieu</description>
    <html-display-option name="size" value="5"/>
    <file>lieux.txt</file>
    <validation-regexp>/[0-9]*/</validation-regexp>
    <validation-message>Sélectionner un ou plusieurs types de lieu.</validation-message>
  </var>
<!--
  <var name="aux_saisie" type="select">
    <description>Selectionner entree</description>
    <html-display-option name="size" value="5"/>
    <html-display-option name="maxlength" value="70"/>
    <validation-regexp>/1/</validation-regexp>
    <validation-message>Sélectionner une valeur.</validation-message>
  </var>
--> 
 
  <var name="ok_button" type="button">
    <description>valider l'enregistrement</description>
    <html-display-option name="size" value="15"/>
    <html-display-option name="maxlength" value="15"/>
    <act>doValidate(this.form);</act>
    <validation-regexp>//</validation-regexp>
    <validation-message>valider les saisies</validation-message>
  </var>
  
  </form-config>