Creating Custom Request Forms

Print Friendly and PDF Follow

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

  1. Select one of your existing ILLiad request forms (for example, LoanRequest.html) and copy it.
  2. Rename the copied page to GenericRequestX.html where the X represents your description of the new page. Example: GenericRequestMusicScore.html.
  3. 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:

  1. 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. 
  2. Rename the copied page to EditGenericRequestX.html where the X represents your description of the new page. Example: EditGenericRequestMusicScore.html.
  3. Edit the HTML of the new page to reflect the new request type.
Note: All Edit forms must include a hidden input for the TransactionNumber field. Ensure that your custom Edit form includes the following line of code near the top of the file where hidden inputs are listed:
<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):

  1. Add the following lines to the HTML code of the new request form. 
  2. Note that if you are creating the new form by copying an existing form, the first and second lines of code are already there.
  3. 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">
  4. Again, the X in the first line of code is used to describe the new type of request, for example, GenericRequestMusicScore
  5. 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
  6. 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:

  1. Add the following lines to the HTML code of the new edit request form. 
  2. Note that if you are creating the new form by copying an existing form, these lines of code are already there.
  3. 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">
  4. Again, the X in the first line of code is used to describe the new type of request, for example, EditGenericRequestMusicScore
Note that the hidden inputs for the RequestType and DocumentType fields that we added to the request form in the previous section should not be added to the edit form. Hardcoding these values in the edit form could cause unintentional issues if, for example, library staff changes the request's DocumentType in the ILLiad Client, but the patron then edits the request on the web and the hidden input inadvertently overrides the staff change. 
The hidden input for the ILLiadForm field that specifies the new form name in the value attribute is essential on both the request and edit forms as ILLiad will use this value to identify the form and apply any validation rules for the form defined in the ILLiad Customization Manager's WebValidation table. See Adding Values to the WebValidation Table below for more information.

Edit the Main Menu Page

To create a link to the new request form on the ILLiad Main Menu:


For ILLiad users on v9.0 the menu will be located in the include_menu.html. For ILLiad 9.1 users, the menu could be located in the include_nav_search or include_nav.html depending on which style you are using.
  1. Open the include_menu.html page.
  2. Add the following code to the list of new requests:

    <li>
    <a href="<#ACTION action="10" form="20" value="GenericRequestMusicScore">">
    Music Score</a>
    </li>
  3. Be sure to use the settings exactly as they are in the code sample for action and form.
  4. 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.

Questions?

If this article didn’t resolve your issue, please contact Atlas Support for assistance:

Contact Support