{"id":35560,"date":"2025-05-15T12:30:16","date_gmt":"2025-05-15T16:30:16","guid":{"rendered":"https:\/\/wbab.suffolk.lib.ny.us\/?page_id=35560"},"modified":"2026-07-31T11:40:40","modified_gmt":"2026-07-31T15:40:40","slug":"librarycard-application","status":"publish","type":"page","link":"https:\/\/wbab.suffolk.lib.ny.us\/redesign\/librarycard-application\/","title":{"rendered":"Library Card Application"},"content":{"rendered":"<p><script>\r\n\r\n   document.getElementById(\"submit-application\").onclick = function() {\r\n var form = document.getElementById(\"LibraryCardApplication\");\r\n var formElements = form.querySelectorAll(\"input[required], select[required]\");\r\n\r\n for(var i = 0; i < formElements.length; i++) {\r\n   if(formElements[i].value === \"\") {\r\n     document.getElementById(\"submit-application\").disabled = false;\r\n     return false;\r\n   }\r\n }\r\n};\r\n\r\n    FileValidation = () => {\r\n        const fi = document.getElementById('file');\r\n\tvar filePath = fi.value;\r\n\r\n           \/\/ Allowing file type \r\n            var allowedExtensions =  \r\n                    \/(\\.doc|\\.docx|\\.pdf|\\.jpg|\\.jpeg|\\.png|\\.gif)$\/i; \r\n              \r\n            if (!allowedExtensions.exec(filePath)) { \r\n                alert('Invalid file type'); \r\n                fi.value = ''; \r\n                return false; \r\n            }  \r\n            else  \r\n            { \r\n              \r\n                \/\/ Image preview \r\n                if (fi.files && fi.files[0]) { \r\n                    var reader = new FileReader(); \r\n                    reader.onload = function(e) { \r\n                        document.getElementById( \r\n                            'imagePreview').innerHTML =  \r\n                            '<img decoding=\"async\" src=\"' + e.target.result \r\n                            + '\"\/>'; \r\n                    }; \r\n                      \r\n                    reader.readAsDataURL(fi.files[0]); \r\n                } \r\n\t     }\r\n        \/\/ Check if any file is selected.\r\n        if (fi.files.length > 0) {\r\n            for (const i = 0; i <= fi.files.length - 1; i++) {\r\n \r\n                const fsize = fi.files.item(i).size;\r\n                const file = Math.round((fsize \/ 1024));\r\n                \/\/ The size of the file.\r\n                if (file >= 8192) {\r\n                    alert(\r\n                      \"File too Big, please select a file less than 8mb\");\r\n\t\t\tdocument.getElementById('file').value= null;\r\n                } else {\r\n                    document.getElementById('size').innerHTML = '<b>'\r\n                    + file + '<\/b> KB';\r\n                }\r\n            }\r\n        }\r\n    }\r\n<\/script>\r\n\r\n<script src=\"https:\/\/www.google.com\/recaptcha\/api.js\" async defer><\/script>\r\n     <script>\r\n       function onSubmit(token) {\r\n         document.getElementById(\"LibraryCardApplication\").submit();\r\n       }\r\n     <\/script>\r\n<script>\r\n    function enableBtn(){\r\n        document.getElementById(\"submit-application\").disabled = false;\r\n      \r\n    \r\n}\r\n<\/script>\r\n<script type=\"text\/javascript\">\r\n\r\n   \r\n\r\n    $(document).ready(function () {\r\n\r\n        $(\"#LibraryCardApplication\").submit(function (e) {\r\n\r\n            $(\"#submit-application\").attr(\"disabled\", true);\r\n            return true;\r\n        });\r\n\r\n    });\r\n\r\n    \r\n\r\n<\/script><\/p>\n<p><span style=\"color: red;\"> <strong> Library card applications or renewals are not automatic; staff will contact you after reviewing your submission. <\/strong> <\/span><\/p>\n<form id=\"LibraryCardApplication\" action=\"\/LibraryCardApplication\/ApplicationSubmit.php\" enctype=\"multipart\/form-data\" method=\"post\">\n<table bgcolor=\"white\">\n<tbody>\n<tr>\n<td>Apply or Renew?<br \/>\n<select id=\"type\" name=\"type\" required=\"\"><option value=\"Apply\">Apply<\/option><option value=\"Renew\">Renew<\/option><\/select><\/td>\n<td><b>If renewing a card, please enter<br \/>\nLibrary card barcode number<b><\/b><br \/>\n<input name=\"barcode\" type=\"text\" \/> <\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Type of Card<\/b><\/p>\n<p><select id=\"ctype\" name=\"ctype\" required=\"\"><option value=\"Adult\">Adult<\/option><option value=\"Child\">Child (Birth to Age 18)<\/option><\/select><\/td>\n<td><b>If child card (Birth to Age 18),<br \/>\nPlease indicate date of birth.<br \/>\n<\/b><input name=\"dob\" type=\"text\" \/><\/td>\n<\/tr>\n<tr>\n<td><b>First Name<\/b><br \/>\n<input name=\"fname\" required=\"\" type=\"text\" \/><\/td>\n<td><b>Last Name<\/b><br \/>\n<input name=\"lname\" required=\"\" type=\"text\" \/><\/td>\n<\/tr>\n<tr>\n<td><b>Phone<\/b><br \/>\n<input name=\"phone\" required=\"\" type=\"text\" \/><\/td>\n<td><b>Email<\/b><br \/>\n<input name=\"email\" required=\"\" type=\"text\" \/><\/td>\n<\/tr>\n<tr>\n<td><b>Street Address <\/b><br \/>\n<input name=\"address\" required=\"\" type=\"text\" \/><\/td>\n<td><b>City<\/b><br \/>\n<input name=\"city\" required=\"\" type=\"text\" \/><\/td>\n<\/tr>\n<tr>\n<td><b>State<\/b><br \/>\n<input name=\"state\" required=\"\" type=\"text\" value=\"NY\" \/><\/td>\n<td><b>Zip<\/b><br \/>\n<select id=\"zip\" name=\"zip\" required=\"\"><option value=\"11704\">11704<\/option><option value=\"11702\">11702<\/option><\/select><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/wbab.suffolk.lib.ny.us\/redesign\/wp-content\/uploads\/2025\/05\/Library-Card-Flyer.png\">Click Here View New Library Card Designs<\/a><\/td>\n<td><b>Choose Design <\/b><br \/>\n<select id=\"design\" name=\"design\" required=\"\"><option value=\"\">&#8212; Please select a design &#8212;<\/option><option value=\"1\">Design 1<\/option><option value=\"2\">Design 2<\/option><option value=\"3\">Design 3<\/option><option value=\"4\">Design 4<\/option><option value=\"5\">Design 5<\/option><\/select><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\" align=\"center\"><b><span style=\"font-size: large;\">Documentation ** 2 Forms Required. Must be dated within 60 days.<br \/>\nUploaded documents must be less than 8mb each.<\/span><\/b><\/td>\n<\/tr>\n<tr>\n<td><center><\/center><b>Select Document Types Below:<b><br \/>\n<input name=\"forms[]\" type=\"checkbox\" value=\"NYS Drivers License\" \/>NYS Drivers License<br \/>\n<input name=\"forms[]\" type=\"checkbox\" value=\"Auto Insurance\" \/>Auto Insurance<br \/>\n<input name=\"forms[]\" type=\"checkbox\" value=\"Pay Stub\" \/>Pay Stub<br \/>\n<input name=\"forms[]\" type=\"checkbox\" value=\"Tax Bill\" \/>Tax Bill<br \/>\n<input name=\"forms[]\" type=\"checkbox\" value=\"Utility Bill\" \/>Utility Bill<br \/>\n<\/b><\/b><\/td>\n<td><b>Upload Document 1 here:<\/b><br \/>\n<input id=\"file\" accept=\".jpg, .jpeg, .png, .doc, .docx, .pdf\" name=\"attach1\" required=\"\" type=\"file\" \/><br \/>\nUpload Document 2 here:<br \/>\n<input id=\"file2\" accept=\".jpg, .jpeg, .png, .doc, .docx, .pdf\" name=\"attach2\" required=\"\" type=\"file\" \/><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\" align=\"center\">\n<div class=\"g-recaptcha\" data-sitekey=\"6LersEAaAAAAAGS1Rf1f1ewj9QttIAhwqMnpOayT\" data-callback=\"enableBtn\"><\/div>\n<p><input id=\"submit-application\" class=\"btn\" disabled=\"disabled\" name=\"submit\" type=\"submit\" value=\"Click Here to Submit Application\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/form>\n","protected":false},"excerpt":{"rendered":"<p>Library card applications or renewals are not automatic; staff will contact you after reviewing your submission. Apply or Renew? ApplyRenew If renewing a card, please enter Library card barcode number Type of Card AdultChild (Birth to Age 18) If child card (Birth to Age 18), Please indicate date of birth. First Name Last Name Phone [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_exactmetrics_skip_tracking":false,"footnotes":""},"class_list":["post-35560","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wbab.suffolk.lib.ny.us\/redesign\/wp-json\/wp\/v2\/pages\/35560","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wbab.suffolk.lib.ny.us\/redesign\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/wbab.suffolk.lib.ny.us\/redesign\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/wbab.suffolk.lib.ny.us\/redesign\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wbab.suffolk.lib.ny.us\/redesign\/wp-json\/wp\/v2\/comments?post=35560"}],"version-history":[{"count":17,"href":"https:\/\/wbab.suffolk.lib.ny.us\/redesign\/wp-json\/wp\/v2\/pages\/35560\/revisions"}],"predecessor-version":[{"id":38021,"href":"https:\/\/wbab.suffolk.lib.ny.us\/redesign\/wp-json\/wp\/v2\/pages\/35560\/revisions\/38021"}],"wp:attachment":[{"href":"https:\/\/wbab.suffolk.lib.ny.us\/redesign\/wp-json\/wp\/v2\/media?parent=35560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}