Location Verification
The Location Verification feature allows users to submit their information to verify they live in Poway and qualify for an account. Submissions are reviewed within 3 business days.
Overview
This feature provides a streamlined process for users to:
Submit their personal information
Verify their Poway residency
View all submitted entries
Receive email confirmation upon qualification
How to Use
Enter Your Name
Fill in your full name in the Name field.
Provide Email Address
Enter a valid email address where you’ll receive account qualification notifications.
Enter Your Address
Provide your complete Poway address for verification purposes.
Submit Information
Click the “Submit” button to send your information for review.
Wait for Confirmation
You will be emailed within 3 business days if you qualify for an account.
API Integration
The verification system uses the following API endpoint:
const API_BASE = 'https://autonomous.stu.nighthawkcodingsociety.com/api' ;
Submit Entry
const res = await fetch ( ` ${ API_BASE } /entries` , {
method: 'POST' ,
mode: 'cors' ,
cache: 'default' ,
credentials: 'include' ,
headers: {
'Content-Type' : 'application/json'
},
body: JSON . stringify ({ name , email , address })
});
Request Parameters
Parameter Type Required Description namestring Yes Full name of the applicant emailstring Yes Valid email address addressstring Yes Complete Poway address
The form includes client-side validation and submission handling:
form . addEventListener ( 'submit' , async ( e ) => {
e . preventDefault ();
const name = document . getElementById ( 'name' ). value ;
const email = document . getElementById ( 'email' ). value ;
const address = document . getElementById ( 'address' ). value ;
const res = await fetch ( ` ${ API_BASE } /entries` , {
... fetchOptions ,
method: 'POST' ,
body: JSON . stringify ({ name , email , address })
});
const data = await res . json ();
if ( ! res . ok ) {
message . textContent = data . error || 'Failed to submit entry.' ;
} else {
message . textContent = 'Entry submitted successfully!' ;
form . reset ();
}
});
The form automatically resets after successful submission, allowing you to submit another entry if needed.
Viewing Entries
Users can view all submitted entries using the “View All Entries” button:
viewEntriesBtn . addEventListener ( 'click' , async () => {
entries . innerHTML = '' ;
message . textContent = '' ;
const res = await fetch ( ` ${ API_BASE } /entries` , fetchOptions );
const data = await res . json ();
if ( ! res . ok ) {
message . textContent = data . error || 'Unable to fetch entries.' ;
return ;
}
if ( ! data . length ) {
entries . innerHTML = '<p>No entries found.</p>' ;
return ;
}
entries . innerHTML = '<h3>All Entries</h3>' ;
data . forEach ( entry => {
const div = document . createElement ( 'div' );
div . className = 'entry' ;
div . innerHTML = `<strong> ${ entry . name } </strong><br> ${ entry . email } <br> ${ entry . address } ` ;
entries . appendChild ( div );
});
});
UI Components
Submission Form Clean, user-friendly form with input validation
Real-time Feedback Immediate success or error messages after submission
Entry Display View all submitted entries in organized format
Responsive Design Mobile-friendly interface with clean styling
< form id = "entryForm" >
< h2 > Submit Your Information for Account Qualification. You will be emailed within 3 business days if you live in Poway, and qualify for an account </ h2 >
< input type = "text" id = "name" placeholder = "Name" required >
< input type = "email" id = "email" placeholder = "Email" required >
< input type = "text" id = "address" placeholder = "Address" required >
< button type = "submit" > Submit </ button >
< button type = "button" id = "viewEntries" > View All Entries </ button >
< div id = "message" ></ div >
</ form >
Styling
The interface features a modern, clean design:
form , .entries-container {
background : #fff ;
padding : 20 px ;
border-radius : 8 px ;
box-shadow : 0 0 10 px rgba ( 0 , 0 , 0 , 0.1 );
max-width : 500 px ;
margin : auto ;
}
button {
background-color : #00796b ;
color : white ;
border : none ;
cursor : pointer ;
}
button :hover {
background-color : #005b4f ;
}
.entry {
margin-top : 10 px ;
padding : 10 px ;
background : #f0f0f0 ;
border-left : 4 px solid #00796b ;
}
The form uses HTML5 validation with the required attribute on all input fields, ensuring data completeness before submission.
Error Handling
If submission fails, the error message is displayed in red text: if ( ! res . ok ) {
message . textContent = data . error || 'Failed to submit entry.' ;
}
When unable to retrieve entries: if ( ! res . ok ) {
message . textContent = data . error || 'Unable to fetch entries.' ;
return ;
}
Gracefully handles cases with no entries: if ( ! data . length ) {
entries . innerHTML = '<p>No entries found.</p>' ;
return ;
}
CORS Configuration
The API supports cross-origin requests:
const fetchOptions = {
method: 'GET' ,
mode: 'cors' ,
cache: 'default' ,
credentials: 'include' ,
headers: {
'Content-Type' : 'application/json'
}
};
Credentials are included in requests to maintain session state. Ensure your browser allows cookies from the API domain.
Response Handling
Successful submission provides immediate feedback:
const data = await res . json ();
if ( ! res . ok ) {
message . textContent = data . error || 'Failed to submit entry.' ;
} else {
message . textContent = 'Entry submitted successfully!' ;
form . reset ();
}
Entry Display Format
Each entry is displayed with formatted information:
data . forEach ( entry => {
const div = document . createElement ( 'div' );
div . className = 'entry' ;
div . innerHTML = `<strong> ${ entry . name } </strong><br> ${ entry . email } <br> ${ entry . address } ` ;
entries . appendChild ( div );
});