You can create as many new web request forms as you wish by creating new request HTML pages and designating each one as a different Document Type.
Copy an Existing Request Form
- Select one of your existing ILLiad request forms (for example, LoanRequest.html) and copy it.
- Rename the copied page to GenericRequestX.html where the X represents your description of the new page. Example: GenericRequestMusicScore.html.
- Edit the HTML of the new page to reflect the new request type.
Note: ILLiad requires that the name of the file begin with the text GenericRequest.
Copy an Existing Edit Request Form
For every new request form that you decide to create, you also need to create a corresponding Edit form to handle the error and editing functions. If the DLL encounters a problem when the request is submitted, it jumps to the Edit page for editing. To create a custom Edit form:
- Find the corresponding Edit form for the existing ILLiad request form you selected to copy for your custom request form (for example, EditLoanRequest.html) and copy it.
- Rename the copied page to EditGenericRequestX.html where the X represents your description of the new page. Example: EditGenericRequestMusicScore.html.
- Edit the HTML of the new page to reflect the new request type.
<input type="hidden" name="TransactionNumber"
value="<#PARAM name='TransactionNumber'>">
Add Identifier Code to the New Form
The following steps should be taken to add and adjust code on the new request form and its corresponding edit form to ensure that ILLiad can identify the new form name and properly set the RequestType and DocumentType:
Request Form Steps
The steps for adding identifier code to the new request form are as follows (note that these steps will differ slightly for the edit form):
- Add the following lines to the HTML code of the new request form.
- Note that if you are creating the new form by copying an existing form, the first and second lines of code are already there.
- You will need to edit the name field of the first line and the value field of the second line and then add the two remaining lines of code as shown below:
<form action="illiad.dll" method="post" name="GenericRequestX">
<input type="hidden" name="ILLiadForm" value="GenericRequestX"> <input type="hidden" name="RequestType" value="Loan"> <input type="hidden" name="DocumentType" value="Y"> - Again, the X in the first line of code is used to describe the new type of request, for example, GenericRequestMusicScore.
- In specifying the RequestType (in line 3), you should first decide if the system should treat this new type of request as an Article or as a Loan. If the request type is intended to be consumable and will not be returned to the lending institution, set the RequestType value to Article. If the request type is intended to be returned to the lending institution, set the value to Loan.
- The DocumentType to be recorded by the system for this type of generic request is represented by the Y in Line 4. For this example, we are using Music as the DocumentType, so we would format the DocumentType input as follows:
<input type="hidden" name="DocumentType" value="Music">
The DocumentType can only be set on Generic Request forms. You cannot set the DocumentType on default request forms such as ArticleRequest.html or LoanRequest.html - the database will automatically change it back to the default value.
Edit Form Steps
Once identifier code is added to the new request form, the corresponding edit form should be adjusted as follows:
- Add the following lines to the HTML code of the new edit request form.
- Note that if you are creating the new form by copying an existing form, these lines of code are already there.
- You will need to edit the name field of the first line and the value field of the second line as shown below:
<form action="illiad.dll" method="post" name="EditGenericRequestX">
<input type="hidden" name="ILLiadForm" value="EditGenericRequestX"> - Again, the X in the first line of code is used to describe the new type of request, for example, EditGenericRequestMusicScore.
Edit the Main Menu Page
To create a link to the new request form on the ILLiad Main Menu:
- Open the include_menu.html page.
-
Add the following code to the list of new requests:
<li> <a href="<#ACTION action="10" form="20" value="GenericRequestMusicScore">"> Music Score</a> </li>
- Be sure to use the settings exactly as they are in the code sample for action and form.
- This text can be customized, but must contain the text that you used when creating the new page.
Changes in the Customization Manager
Adding Values to the WebFormValues Table
If you are using Submit, Cancel and Quit, or similar buttons on the new form, you need to add entries for the buttons to the WebFormValues table in the Customization Manager. The value in the SubmitButtonValue field should be the default value of this button. The value in the SubmitButtonText field is the text that you are using for this button in your request form.
Adding Values to the DocumentTypeOptions Key
In order for the document type of your new generic request to appear as a drop down option in the request form within the ILLiad client, it will need to be added to the DocumentTypeOptions key. This will be the same value that you placed in the DocumentType hidden field.
Adding Values to the WebValidation Table
Any fields marked as required on your new request and edit forms should be added as entries to the Customization Manager's WebValidation table. The Formname column for these entries should contain either GenericRequestX or EditGenericRequestX (depending on whether the entry is being created for the request form or its edit form) where X is the name you specified for the form (e.g., GenericRequestMusicScore). For more information on the WebValidation table, see Changing Required Fields.