cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

Add pre-fill ability for phone number input

Open gavry opened this issue 3 years ago • 0 comments

Is your proposal related to a problem?

I do not want to require users to input their phone numbers after I've already collected them internally.

Describe the solution you'd like

Allow pre-filling of the phone number field within the Cal Embed.

Describe alternatives you've considered

Tried inspecting the inputs and adding "smsReminderNumber" to the search params / config. Unfortunately it didn't connect :(

Additional context

Not sure if there's a specific reason this was decided against, or if it just hasn't been needed yet. I believe the change would be to add router.query.smsReminderNumber to the return statement of the defaultValues function here: https://github.com/calcom/cal.com/blob/69925af17c501ed51c54a9f21dd94dc2014ded20/apps/web/components/booking/pages/BookingPage.tsx#L200-L242

(coalescing after booking.smsReminderNumber? Could also argue for before as an override).

Happy to make the change and open a pull request if this would be a helpful feature in general. Thanks!

gavry avatar Dec 23 '22 17:12 gavry