Table des matières
- eZ Publish : Comment créer des formulaires avec eZ Publish
- Creating a new form class -- Créer une nouvelle classe «formulaire»
- Form configuration settings -- Paramètres de configuration du formulaire
- Form template creation and modification -- Création et modification des templates du formulaire
- Creating the form object -- Créer l'objet formulaire
- Accessing collected information -- Accéder aux informations collectées
- Summary and resources -- Résumé et ressources
Creating a new form class -- Créer une nouvelle classe «formulaire»
Date de publication: le vendredi 27 mai 2011 à 10h05
Dernière modification: par Pascal BOYER le vendredi 27 mai 2011 à 11h30
The first step in creating the membership application form is to create a class for the object that will collect the information from visitors.
La première étape de la phase de création du formulaire d'adhésion consiste à créer une classe pour l'objet qui collectera les saisies des visiteurs.
To do this, log in to the Administration Interface and click on the Setup tab. In the left menu, click the Classes link:
Pour ce faire, connectez vous à l'interface d'administration puis cliquez sur l'onglet Administration. Dans le menu de gauche qui s'affiche alors, cliquez sur le lien Classes:
Click on the Classes link / Cliquez sur le lien Classes
Then, in the Class groups window, click the Content link. Our form will appear in the Content branch of the site's node tree and thus be under this group:
Dans le cadre Groupes de classes, cliquez sur le lien Content. Notre formulaire apparaitra dans la branche Contenus de l'arborescence de nœuds du site et sera donc placé dans ce groupe:
"Content" class group / Le groupe de classes Content
You are then presented with a list of all the existing classes in the Content class group. At the bottom of this list, click the New class button:
Vous voyez à présent la liste de toutes les classes existant dans le groupe de classes Content. Au bas de cette liste, cliquez sur le bouton Nouvelle classe:
New class button / Le bouton Nouvelle classe
This will then display the Class edit interface:
S'affiche alors l'interface d'édition de classe:
Class edit interface / L'interface d'édition de classe
In our example, the name of the form is “Membership Application Form”, its identifier is “membership_application_form” and the object name pattern is “<form_name>”.
Dans notre exemple, le nom du formulaire est «Membership Application Form» (Formulaire d'adhésion), son identifiant membership_application_form et le modèle de nom d'objet <form_name>.
To add an attribute, select the datatype from the dropdown list at the bottom of the page and click the adjacent Add attribute button. Then, fill in the necessary information for the attribute. Repeat this in order to add subsequent attributes:
Pour ajouter un attribut, sélectionnez un datatype à partir du menu déroulant situé au bas du cadre Modifier <Nouvelle Classe> puis validez avec le bouton Ajouter l'attribut. Remplissez ensuite les informations relatives à ce nouvel attribut. Répétez l'opération pour chacun des attributs à ajouter:
Add attribute / Le bouton Ajouter l'attribut
Note that the attributes that will collect information (through form fields presented to the visitor) need to have the Information collector checkbox marked:
Retenez qu'il est nécessaire de cocher l'option Collecteur d'information pour les attributs collecteurs d'information (par le biais des champs du formulaire présentés aux visiteurs):
Information collector checkbox / La case à cocher Collecteur d'information
Rather than repeating the explanation of the steps to add each attribute, the information for all the attributes is summarized in the table below:
Plutôt que de répéter les mêmes explications pour chacun des datatypes à ajouter, référez-vous au tableau ci-dessous qui résume l'ensemble des informations:
|
Name Nom |
Identifier Identifiant | Datatype |
Required Requis |
Searchable Interrogeable |
Information collector Collecteur d'information |
|---|---|---|---|---|---|
|
Form Name nom du formulaire | form_name |
Text line Ligne de texte | Yes | Yes | No |
|
Form Introduction Texte d'introduction du formulaire | form_introduction |
XML block Bloc XML | No | Yes | No |
|
Given Name Prénom | given_name |
Text line Ligne de texte | Yes | No | Yes |
|
Family Name Nom de famille | family_name |
Text line Ligne de texte | Yes | No | Yes |
|
Date of Birth Date de naissance | date_of_birth | Date | Yes | No | Yes |
|
Contact Phone Number N° de téléphone | contact_phone_number |
Text line Ligne de texte | Yes | No | Yes |
|
Email Address Adresse e-mail | email_address | Yes | No | Yes | |
|
Postal Address Adresse postale | postal_address |
Text block Bloc de texte | Yes | No | Yes |
|
Please send me information about the club's tennis tournaments S'il vous plaît, envoyez-moi les informations relatives aux tournois de tennis du club | option_play_in_tournaments |
Checkbox Case à cocher | No | No | Yes |
|
Please send me information about tennis classes and professional coaching S'il vous plaît, envoyez-moi les informations relatives aux cours de tennis et au coaching professionnel | option_classes_and_coaching |
Checkbox Case à cocher | No | No | Yes |
|
I would like to receive the monthly club newsletter by email Je souhaite recevoir par mail la newsletter mensuelle du club | option_club_newsletter |
Checkbox Case à cocher | No | No | Yes |
|
Please keep me informed about the club's social events and competitions S'il vous plaît, tenez-moi informé des événements et compétitions du club |
option_social_events_ competitions |
Checkbox Case à cocher | No | No | Yes |
|
Can we help by answering any questions? Pouvons-nous vous aider en répondant à vos question ? | other_questions |
Text block Bloc de texte | No | No | Yes |
|
Membership Coordinator E-mail Address Adresse e-mail du coordinateur des adhérents. |
membership_coordinator_email_ address |
E-mail Courriel | Yes | No | No |
Re-organizing class attributes / Réorganisation des attributs de la classe
Sometimes, when creating a class, it is useful to change the order of the attributes. This determines the order of attributes presented when a user creates an object (thus creating the form). If a custom template to display the form is not used, then this order also determines the order of the fields when the object / form is viewed on the front-end of the site. The elements highlighted below can be used to re-order attributes.
Lors de la création d'une classe, il arrive parfois qu'il soit préférable de modifier l'ordre des attributs. Cela détermine l'ordre dans lequel sont présentés les attributs quand un utilisateur crée un objet (et donc un formulaire). Si un template personnalisé d'affichage du formulaire n'est pas utilisé, alors cet ordre détermine également celui des champs de l'objet/formulaire lorsqu'il est affiché sur le site public. Les éléments mis en évidence ci-dessous peuvent être utilisés pour modifier l'ordre des attributs:
Reorganize class attributes / Réorganiser l'ordre des attributs de classe
There are two ways to re-order attributes:
Il existe donc deux façons de modifier l'ordre des attributs:
-
Use the arrow buttons to shift the current attribute up or down one position in the class attribute list; or
Utilisez les fléches pour déplacer dans la liste des attributs l'actuel attribut d'un cran vers le haut ou le bas, ou bien...
-
Change the attribute numbers, which can be faster than moving attributes with the arrow keys if you need to re-order many attributes at once.
...modifiez le numéro de l'attribut, ce qui peut s'avérer plus rapide que la précédente méthode lorsque vous souhaitez réorganiser plusieurs attributs.
When using the first method, the page will automatically reload with the attribute order changed. However, if the attributes are renumbered using the second method, you must click the Apply button (or OK button if you are finished editing the class) to store the changes.
Lorsque vous employez la première méthode, la page est automatiquement rechargée et présente alors la nouvelle position de l'attribut. Cependant, avec la seconde méthode vous devez valider vos modifications avec le bouton Appliquer (ou OK si vous avez terminé la création de votre classe) pour que celles-ci soient enregistrées.
Apply button / Le bouton Appliquer
Saving the new class / Sauvegarder la nouvelle classe
Once you have entered all the relevant attribute information, click the OK button to add the new class.
Une fois toutes les informations relatives aux attributs paramétrées, cliquez sur le bouton OK pour ajouter la nouvelle classe.
The next step is to modify the appropriate INI settings in order to configure the form.
La prochaine étape consiste à modifier les paramètres INI appropriés afin de configurer le formulaire.
Table des matières
- eZ Publish : Comment créer des formulaires avec eZ Publish
- Creating a new form class -- Créer une nouvelle classe «formulaire»
- Form configuration settings -- Paramètres de configuration du formulaire
- Form template creation and modification -- Création et modification des templates du formulaire
- Creating the form object -- Créer l'objet formulaire
- Accessing collected information -- Accéder aux informations collectées
- Summary and resources -- Résumé et ressources
Commentaires














