Repository navigation
Add a phone intake-question type (tel input, validation, normalized value) #260
dominik-myszkowski
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Intake questions currently support text, select and checkbox (event_type_questions.type). Collecting a phone number today means a text question. That gives no type="tel" keyboard on mobile, no validation and free-form values (600 100 200, +48600100200, 0048 600-100-200…), which makes the number hard to use downstream (SMS reminders, CRM sync, calling the lead).
I know about the existing "allow phone call" option (allow_phone_call, the f-phone field stored as tel: in the location). It covers a different case: the attendee opting for a phone call instead of an online meeting, with the field optional. We'd like the phone number as a regular, optionally required question on any event type.
Proposal:
New question type phone. It renders and validates with the existing lenient validPhone rule on the server.
Optional per-instance or per-event-type default country code (e.g. +48), used to normalize the stored answer to E.164. The raw input can be kept alongside.
Exposed like other answers in GET /v1/bookings/{id}/answers and in webhook payloads, ideally also as a top-level attendee_phone when the event type has exactly one phone question.
Happy to implement this (migration extending the CHECK, admin question editor, booker template, validation, tests, i18n keys) if you're OK with the direction.
All reactions