Skip to content

Latest commit

 

History

History
39 lines (20 loc) · 1.23 KB

File metadata and controls

39 lines (20 loc) · 1.23 KB

Listen for a form submission and run some code

Add a submit event listener to a form so I can run custom code when someone checks in.

Get the values from an input and a dropdown

Get the name a user typed in and the team they selected from a dropdown menu.

Increment a total and store it in a variable

Create a counter that goes up by 1 every time someone submits the form.

Calculate the percentage of a goal completed

Use the current count and a max goal to calculate a progress percentage.

Combine a name and team into a welcome message

Use someone's name and selected team to create a personalized greeting.

Reset the form after it’s submitted

Clear all fields in the form so it's ready for the next attendee.

Show the updated total count on the page

Update the text inside a span to show the current attendee count.

Update the width of a progress bar using a percentage

Change the width of a progress bar based on the calculated progress.

Update the correct team’s count on the page

Use a selected team value to find the matching team element and update its count.

Show a success message with someone's name and team

Display a greeting message that includes the person’s name and the full team label.