Skip to main content
ExLibris

Knowledge Assistant

BETA
 
  • Subscribe by RSS
  • Back
    Aleph

     

    Ex Libris Knowledge Center
    1. Search site
      Go back to previous article
      1. Sign in
        • Sign in
        • Forgot password
    1. Home
    2. Aleph
    3. Knowledge Articles
    4. How to make a field mandatory in an OPAC form?

    How to make a field mandatory in an OPAC form?

    1. Last updated
    2. Save as PDF
    3. Share
      1. Share
      2. Tweet
      3. Share
    No headers
    • Article Type: General
    • Product: Aleph
    • Product Version: 20

    Desired Outcome Goal:
    How to make a field mandatory in an OPAC form?

    Procedure:
    To make a field mandatory in an OPAC form follow these steps (example is for form “feedback”):

    1. Change in $alephe_root/www_f_lng/feedback the form tag so that you have in line onsubmit the following:
    onsubmit='return checkMail();'

    2. Add the following Java Script to head of the above file:

    <script language="javascript">
    function checkMail() {
    if (document.form1.TARGET.value == '') {
    alert('E-Mail is missing');
    return(false);
    }
    else document.form1.submit();
    }
    </script>

    Explanation:
    *checkMail is a free chosen name for the script
    * form1 is the name of the form
    * TARGET is the name of the field for the mail address
    * For ALERT you can choose any warning text

    Category: Web OPAC (500)


    • Article last edited: 10/8/2013
    View article in the Exlibris Knowledge Center
    1. Back to top
      • How to make a change to item collection
      • How to make a shortcut key for changing catalog editing direction
    • Was this article helpful?

    Recommended articles

    1. Article type
      Topic
      Language
      English
      Product
      Aleph
    2. Tags
      1. 20
      2. contype:kba
      3. Prod:Aleph
      4. Type:General
      5. Web OPAC (500)
    1. © Copyright 2025 Ex Libris Knowledge Center
    2. Powered by CXone Expert ®
    • Term of Use
    • Privacy Policy
    • Contact Us
    2025 Ex Libris. All rights reserved