As auserI caneasily fill in a contact form if I want to get in touch with the site managersso that I canget my questions answered if needed.
Acceptance Criteria:
Acceptance Criteria 1: The contact form is accessible from the main page and the navbar.
Acceptance Criteria 2: The contact form should be simple, requiring only essential information.
Acceptance Criteria 3: For logged-in users, the email field should be pre-filled with their registered email address.
Acceptance Criteria 4: After submitting the form, users should receive immediate visual feedback (e.g., a success message) confirming that their message has been sent.
Tasks:
[x] Implement a Contact model to store contact form submissions, including fields for subject, email, phone number, message, and submission timestamp.
[x] Create a ContactForm form class to render the form fields in HTML, using Django forms.
[x] Design a template snippet for the contact form that can be included desired template.
[x] Ensure the email field is automatically filled for authenticated users by adjusting the ContactForm initialization in the view.
[x] Add form validation to ensure all required fields are filled and the email address is in the correct format.
Description:
As a user I can easily fill in a contact form if I want to get in touch with the site managers so that I can get my questions answered if needed.
Acceptance Criteria:
Tasks:
Contact
model to store contact form submissions, including fields for subject, email, phone number, message, and submission timestamp.ContactForm
form class to render the form fields in HTML, using Django forms.ContactForm
initialization in the view.