Page MenuHomec4science

implementwebform.php.wml
No OneTemporary

File Metadata

Created
Wed, Jun 19, 00:48

implementwebform.php.wml

## $Id$
## This file is part of the CERN Document Server Software (CDSware).
## Copyright (C) 2002 CERN.
##
## The CDSware is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## The CDSware is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with CDSware; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#include "configbis.wml"
<?
require("<LIBDIR>/php/cdsware/websubmit/commonPhpFunctions.php");
?>
#include "cdspage.wml" \
title="Create and maintain the web form" \
navtrail_previous_links="<a class=navtrail href=<WEBURL>/admin/<lang:star: index.*.html>><MSG_ADMIN_AREA></a> &gt; <a class=navtrail href=<WEBURL>/admin/websubmit/><MSG_ADMIN_SUBMIT></a> &gt; <a class=navtrail href=<lang:star: index.*.php>><MSG_GUIDE></a>" \
navbar_name="admin" \
navbar_select="websubmit_doc" \
cdspageboxlefttopadd="<protect><?displayLoginMenu('submit');?></protect>"
<?
## $Id$
## DO NOT EDIT THIS FILE! IT WAS AUTOMATICALLY GENERATED FROM CDSware WML SOURCES.
?>
<BR>
<SMALL><FONT color=red>What is it?</FONT><BR></SMALL>
<BLOCKQUOTE>
<UL>
<SMALL>
Create and define the web form displayed to the user.
</SMALL>
</UL>
</BLOCKQUOTE>
<BR>
<SMALL><FONT color=red>How to get there?</FONT><BR></SMALL>
<BLOCKQUOTE>
<UL>
<SMALL>
From the main page of the manager, click on the title of the relevant document type.<br>Then click on the icon in the "Edit Submission Pages" column of the relevant line.
</SMALL>
</UL>
</BLOCKQUOTE><SMALL>
<FONT color=red>List of the form pages</FONT><BR></SMALL>
<BLOCKQUOTE>
<UL>
<SMALL>
A web form in the implementation of an action over a document type, can be split over several pages. This is a matter of easiness for the user: he will have an overview of all form present on the page without having to scroll it. Moreover, each time the user goes from one page to the other, all entered data are stored. If he wants to stop then come back later (or if the browser crashes!) he will be able to get back to the submission at the exact moment he left it.<br>
Once here:<br><br>
<IMG src="../../../../img/guide_menupages.jpg"><br><br>
you can see the ordered list of already existing pages in the web form. In this example there are 4 pages. You can then:
<ul>
<li> Move one page from one place to an other, using the small blue arrows under each page number.
<li>Suppress one page by clicking on the relevant red cross.
<li>Add a page, by clicking the "ADD A PAGE" button!
<li><a href="#onepage">Edit the content of one page</a> by clicking on the page number.
<li>Go back to the document main page.
</ul>
</SMALL>
</UL>
</BLOCKQUOTE>
<a name=onepage><SMALL><FONT color=red>Edit one form page</FONT><BR></SMALL>
<BLOCKQUOTE>
<SMALL>
Click on a page number, you then arrive to a place where you can edit this page.<br>
A form page is composed of a list of form elements. Each of these form elements is roughly made of an html template and a text displayed before the form field.<br>
In the first part, you have a preview of what the form will look like to the user.<br><br>
<IMG src="../../../../img/guide_preview.jpg"><br><br>
Then the second table shows you the list of the form elements present on the page:<br><br>
<IMG src="../../../../img/guide_elements.jpg"><br><br>
You can then:
<ul>
<li>Move one element from one place to another on the page using the drop-down menus in the first column ("Item No") of the table, or the little blue arrows in the second column.
<li><a href=#edittemplate>Edit the html template of one form element</a> by clicking on the name of the template in the 3rd column ("Name").
<li><a href=#editelement>Edit one of the form elements</a> by clicking on the icon in the 10th column.
<li>delete one form element by clicking on the relevant red cross.
<li><a href=#addelement>Add an element to the page</a> by clicking the "ADD ELEMENT TO PAGE" button.
</UL>
</SMALL>
</BLOCKQUOTE>
<a name=edittemplate><SMALL><FONT color=red>Edit the html template of one form element</FONT><BR></SMALL>
<BLOCKQUOTE>
<SMALL>
In the html template edition page, you can modify the following values:
<uL>
<LI><b>Element type</b>: indicates which html form element to create
<li><b>Aleph code</b>: <font color=red>Aleph users only!</font> - This indicates in which field of the Aleph document database to retrieve the original value when modifying this information (function Create_Modify_Interface of action MBI).
<li><b>Marc Code</b>: <font color=red>MySQL users only!</font> - This indicates in which field of the MySQL document database to retrieve the original value when modifying this information (function Create_Modify_Interface of action MBI).
<LI><b>Cookies</b>: indicates whether webSubmit will set a cookie on the value filled in by the user. If yes, next time the user will come to this submission, the value he has entered last time will be filled in automatically.
<LI><b>other fields</b>: The other fields help defining the html form element.
</UL>
<font color=red>Important warning!</font> Please remember this is a template! This means it can be used in many different web forms/implementations. When you modify this template the modification will take place in each of the implementations this template has been used.
</SMALL>
</BLOCKQUOTE>
<a name=editelement><SMALL><FONT color=red>Edit one form element</FONT><BR></SMALL>
<BLOCKQUOTE>
<SMALL>
In the form element edition page, you may modify the following values:
<uL>
<li><b>element label</b>: This is the text displayed before the actual form field.
<li><b>level</b>: can be one of "mandatory" or "optional". If mandatory, the user won't be able to leave this page before filling this field in.
<li><b>short desc</b>: This is the text displayed in the summary window ehrn it is opened.
<li><b>Check</b>: Select here the <a href=#addcheck>javascript checking function</a> to be applied to the submitted value of this field
</ul>
</SMALL>
</BLOCKQUOTE>
<a name=addelement><SMALL><FONT color=red>Add one form element</FONT><BR></SMALL>
<BLOCKQUOTE>
<SMALL>
Click on the "ADD ELEMENT TO PAGE" button. There you will have to decide which <a href=#addtemplate>html template field</a> to use ("Element Description code"), and also the field mentioned <a href=#editelement>above</a>.
</SMALL>
</BLOCKQUOTE>
<a name=addtemplate><SMALL><FONT color=red>Create a new html template</FONT><BR></SMALL>
<BLOCKQUOTE>
<SMALL>
You have access to the list of ll existing hteml templates by clicking on the "View element descriptions" link in the left menu in the "Manager" section.<br>
By clicking on one of them, you will have access to its description.<br>
If no template corresponds to the one you seek, click on the "ADD NEW ELEMENT DESCRIPTION" button to create one.<br>
The fields you have to enter in the creation form are the one described in the <a href=#edittemplate>Edit the html template of one form element</a> section.<br>
You also have to choose a name for this new element.<br>
<font color=red>IMPORTANT!</font> The name you choose for your html element is also the name of the file in which webSubmit will save the value entered in this field. This is also the one you will use in your "<a href=uploader.<lang:star: *>.php>uploader</a>" configuration. The uploader is the program which will convert the data gathered in webSubmit in a formatted XML file for insertion in the documents database.
</SMALL>
</BLOCKQUOTE>
<a name=addcheck><SMALL><FONT color=red>Create and edit a checking function.</FONT><BR></SMALL>
<BLOCKQUOTE>
<SMALL>
Click on the "View Checks" link in the top menu, "MANAGER" section. You then have access to a list of all the defined javascript functions.<br>
You can then click on the name of the function you want to modify, or click on the "ADD NEW CHECK" button to create a new javascript function.<br>
These functions are inserted in the web page when the user is doing his submission. When he clicks on "next page", this function will be called with the value entered by the user as a parameter. If the function returns false, the page does not change and an error message should be output. If the function returns true, everything is correct, so page can be changed.
</SMALL>
</BLOCKQUOTE>
<SMALL><FONT color=green>See also:</FONT></SMALL>
<BLOCKQUOTE>
<SMALL>
<A HREF="implementfunctions.<lang:star: *>.php">create and maintain the data treatment</A><BR>
</SMALL>
</BLOCKQUOTE>

Event Timeline