Skip to content

Conversation

@davidmelendez
Copy link
Collaborator

refactor: Separate JavaScript logic from form.html

📝 Description

A refactoring of the JavaScript handling in the application form was performed, separating the logic from the HTML file to improve code maintainability and organization.

🔂 Changes Made

  • Removed inline script from form.html file
  • Created a new form.js file to handle all form logic
  • Linked the new JavaScript file in the HTML through a script tag

⚙️ Related Issue

🍏 Type of Change

  • Refactoring
  • Bug fix
  • New feature
  • Documentation update

🎁 Acceptance Criteria

  • Inline script has been completely removed from the HTML file
  • All form logic is contained in the new form.js file
  • The form maintains all its original functionality
  • JavaScript file is correctly linked to the HTML

🧰 New Environment Variables or Requirements

No new environment variables or dependencies are required.

🧪 How to test

  1. Navigate to the application form
  2. Verify that all form fields work correctly:
    • Required fields show validation
    • "Learn More" buttons work
    • Custom fields show/hide as appropriate
  3. Verify there are no errors in the browser console
  4. Confirm that the form submits correctly

🚀 Deployment Notes (if applicable)

No additional deployment steps are required.

📸 Screenshots (if applicable)

review source

viewSource

test

validaciones

✅ Checklist

  • I have performed a self-review of my code.
  • My code follows the style guidelines of this project.
  • I have commented my code where necessary.
  • I have tested my code locally and verified the website is working as expected.
  • (if applicable) I have added documentation in the README.
  • (if applicable) I have added tests that prove my fix is effective or that my feature works.
  • (if applicable) New and existing unit tests pass locally with my changes.

…inline JavaScript code was removed from the HTML file and organized into form.js to improve code maintainability and structure.
@daaimah123
Copy link
Collaborator

daaimah123 commented Jun 4, 2025

✅ Great work @davidmelendez, approved!

Please kindly update the js file to be nested in an js/app folder or rename it app-form, there may be other app js files that come down as well as other forms used on the site, so its good to have some specificity.

Ready to merge after that change.

@github-project-automation github-project-automation bot moved this to Needs Reviewed in Open-Source TO-DO Board Jun 4, 2025
@daaimah123 daaimah123 linked an issue Jun 4, 2025 that may be closed by this pull request
7 tasks
@daaimah123 daaimah123 moved this to In progress ⏲️ in Application Process Automation Jun 4, 2025
@daaimah123 daaimah123 moved this from Needs Reviewed to In progress in Open-Source TO-DO Board Jun 4, 2025
@daaimah123 daaimah123 moved this from In progress ⏲️ to Testing or Review in Application Process Automation Jun 4, 2025
@daaimah123 daaimah123 moved this from In progress to Needs Reviewed in Open-Source TO-DO Board Jun 4, 2025
@monikkaelyse
Copy link
Collaborator

@davidmelendez @daaimah123 Will be reviewing shortly

@monikkaelyse monikkaelyse self-requested a review June 4, 2025 23:45
Copy link
Collaborator

@monikkaelyse monikkaelyse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor change requested - route "/household" no longer exists, appears to have been changed to "/app-household"

Minor change requested - route "/household" no longer exists, appears to have been changed to "/app-household"

Co-authored-by: m <[email protected]>
@daaimah123
Copy link
Collaborator

I will defer to @monikkaelyse for final approval, I see the update and it looks good on my end.

@daaimah123 daaimah123 merged commit f85ce61 into Techtonica:mvp Jun 5, 2025
@github-project-automation github-project-automation bot moved this from Testing or Review to Implemented or Addressed ✅ in Application Process Automation Jun 5, 2025
@github-project-automation github-project-automation bot moved this from Needs Reviewed to Done in Open-Source TO-DO Board Jun 5, 2025
@davidmelendez davidmelendez deleted the refactor/form-html branch June 6, 2025 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Implemented or Addressed ✅

Development

Successfully merging this pull request may close these issues.

Refactor app-form.html to move <script> block into external JavaScript file

3 participants