Skip to content

Add required field indicators to forms - #653

Open
eicyer wants to merge 3 commits into
masterfrom
required-elements
Open

Add required field indicators to forms#653
eicyer wants to merge 3 commits into
masterfrom
required-elements

Conversation

@eicyer

@eicyer eicyer commented Jan 6, 2026

Copy link
Copy Markdown
Member

Summary

Added visual indicators to required form fields across the application. Updated Label component to support required prop and added indicators to employee, location, ride, and rider forms. MUI components

This pull request is the first step towards having asterisks in required form fields.

Test Plan

I tested manually.
Screenshot 2026-01-06 at 12 07 43 AM

Screenshot 2026-01-05 at 11 10 59 PM

Notes

I initially branched off another PR by mistake; this PRis rebased onto master and now contains only the required-field UI changes

improve UX. Updated Label component to support `required` prop and added
indicators to employee, location, ride, and rider forms. MUI components
use `required` prop; DatePicker/TimePicker use asterisks in label strings.
@eicyer
eicyer requested a review from a team as a code owner January 6, 2026 07:37
@dti-github-bot

dti-github-bot commented Jan 6, 2026

Copy link
Copy Markdown
Member

[diff-counting] Significant lines: 141.

@eicyer eicyer mentioned this pull request Jan 6, 2026

@anika-4444 anika-4444 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great job!

</div>
<div className={styles.col2}>
<Label htmlFor="phoneNumber">Phone Number</Label>
<Label htmlFor="phoneNumber" required>Phone Number</Label>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not a huge deal but this message repeats itself when there is an error
image

<Label htmlFor="startDate" required>Start Date:</Label>
<Input
id="startDate"
type="date"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think I saw someone make a comment about this but I can't remember where or when (so please ignore if this has already been dealt with) but should we also make selecting a role mandatory in this modal?

<div className={styles.box}>
<div className={styles.errorBox}>
<Label className={styles.label} id="pickupLocation">
<Label className={styles.label} id="pickupLocation" required>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note for the future: Once my PR editing the way custom locations (regular text field instead of an address picker) are dealt with is merged, this component is going to look slightly different. We should make sure the required indicators still work correctly once this happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants