Skip to content

Comments

Add tel form field#1440

Merged
LukeTowers merged 4 commits intodevelopfrom
add-phone-field
Feb 20, 2026
Merged

Add tel form field#1440
LukeTowers merged 4 commits intodevelopfrom
add-phone-field

Conversation

@mjauvin
Copy link
Member

@mjauvin mjauvin commented Jan 14, 2026

Related docs PR: wintercms/docs#255

telephone:
    label: Phone number
    type: tel
    pattern: "[0-9]{3}-[0-9]{3}-[0-9]{4}"
    placeholder: xxx-xxx-xxxx
    maxlength: 20
    minlength: 12
    size: 20
    required: true
    options:
        514-123-4567: First Test Phone Number
        800-111-2222: Second Test Phone Number
image

Summary by CodeRabbit

  • New Features
    • Added telephone input field widget supporting preview and edit modes
    • Includes optional datalist with label translation capabilities
    • Supports validation attributes: autocomplete, maxlength, minlength, pattern, and placeholder

✏️ Tip: You can customize this high-level summary in your review settings.

@mjauvin mjauvin added this to the 1.2.10 milestone Jan 14, 2026
@mjauvin mjauvin requested a review from LukeTowers January 14, 2026 21:39
@mjauvin mjauvin self-assigned this Jan 14, 2026
@mjauvin mjauvin added the enhancement PRs that implement a new feature or substantial change label Jan 14, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 14, 2026

Walkthrough

A new PHP partial for rendering a telephone input field with dual modes: preview mode displays a tel: link or empty placeholder, while edit mode renders a tel input with optional datalist support and dynamic attributes including autocomplete, validation patterns, and placeholder text.

Changes

Cohort / File(s) Summary
Telephone Input Partial
modules/backend/widgets/form/partials/_field_tel.php
New file introducing telephone field partial with conditional preview/edit mode rendering, dynamic attribute binding, optional datalist with label translation support, and error handling via type-checking

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Add tel form field' accurately describes the main change: introduction of a new telephone input form field type.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-phone-field

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

@LukeTowers
Copy link
Member

@mjauvin can you do up a docs PR for this field too? ❤️

@mjauvin
Copy link
Member Author

mjauvin commented Jan 14, 2026

@mjauvin can you do up a docs PR for this field too? ❤️

Done!

@LukeTowers LukeTowers modified the milestones: 1.2.10, 1.2.11 Feb 4, 2026
@LukeTowers LukeTowers modified the milestones: 1.2.11, 1.2.12 Feb 18, 2026
@LukeTowers LukeTowers changed the title Add phone form field Add tel form field Feb 20, 2026
@LukeTowers LukeTowers merged commit cab06f5 into develop Feb 20, 2026
13 checks passed
@LukeTowers LukeTowers deleted the add-phone-field branch February 20, 2026 08:08
@coderabbitai coderabbitai bot mentioned this pull request Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement PRs that implement a new feature or substantial change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants