Welcome to Luminate Ideas!

Please submit all product enhancement ideas below. We welcome your feedback; your ideas will be reviewed by the Product Manager that oversees the development of that part of the product on an ongoing basis and updated with its current status monthly based on our product planning process. Ideas you submit could help us shape features currently in development or grow our repository of requirements for our next big enhancement. Thank you for taking the time to share your thoughts and expertise with us.

If you believe you are experiencing a defect please contact Support.

Prevent People Entering a Birthdate in the Future

At present, it is possible for a constituent to enter a birthdate in the future. This is a bit absurd since you generally cannot predict a birthdate. Birthdate should be restricted to today and prior.

  • Guest
  • Oct 23 2020
Area of the Product TeamRaiser
Org/Company Name JDRF
  • Attach files
  • Brian Mucha commented
    23 Oct, 2020 09:16pm

    Put this script in the HTML Area on the Registration Information page in your Teamraiser.

    This removes future years from the select, and simulates the default validation on the birthdate fields on date change or submit.

    <script>
    jQuery(document).ready(function ($) {

    if ( $("#cons_birth_date_YEAR").length ) {

    var thisYear = new Date().getFullYear();
    $("#cons_birth_date_YEAR option").each(function() {
    if ( $(this).val() > thisYear ) {
    $(this).remove();
    }
    });

    $("#cons_birth_date_YEAR, #cons_birth_date_MONTH, #cons_birth_date_DAY").change( function() { validateBirthday() });
    $("#F2fRegContact").submit( function(event) { if (validateBirthday()==false) event.preventDefault(); });

    }

    function validateBirthday() {
    if( $("#cons_birth_date_YEAR").val() && $("#cons_birth_date_MONTH").val() && $("#cons_birth_date_DAY").val() ) {
    var thisDate = new Date().getTime();
    var birthDate = new Date( $("#cons_birth_date_YEAR").val(), $("#cons_birth_date_MONTH").val(), $("#cons_birth_date_DAY").val() ).getTime();
    if ( birthDate >= thisDate ) {
    if ( $("#cons_info_dob.form-error").length == 0 ) {
    $("#cons_info_dob")
    .addClass("form-error")
    .prepend("<div class=\"ErrorMessage\">Must be in the past.</div>");
    }
    return false;
    } else {
    $("#cons_info_dob").removeClass("form-error");
    $("#cons_info_dob .ErrorMessage").remove();
    return true;
    }
    }
    }

    });
    </script>

Privacy Policy | Safe Harbor Notice | Terms of Use | Acceptable Use Policy | © 2019 Blackbaud, Inc. All Rights Reserved