SMS handoff

How to Create an SMS Contact Form

Build a mobile-friendly form that composes an editable SMS draft for a number you control.

By FormToInbox6 min readUpdated 2026-09-03

An SMS form uses the sms URI scheme to hand a recipient and message body to a compatible device. The messaging app should show the draft and require the visitor to confirm sending.

Design for a short mobile interaction

SMS works best for brief enquiries. Ask for only the information needed to identify and answer the request, and keep the message introduction compact enough to review on a phone.

Use an international destination

Enter the destination owner's number in international format. FormToInbox removes visual separators and preserves a leading plus sign when generating the SMS URI. The number remains visible in the exported code.

Build the SMS URI safely

Encode the message body before adding it to the URI. Activating the link should open a composer; it should not silently send a message.

const number = '+15551234567';
const message = ['New website enquiry', 'Name: ' + name, 'Topic: ' + topic].join('\n');
window.location.href = 'sms:' + number + '?body=' + encodeURIComponent(message);

Test costs and compatibility

Test iOS, Android and any desktop environment you support because handling varies by browser and installed apps. Tell visitors that carrier charges may apply and retain a non-SMS contact option.

Frequently asked questions

Is the SMS sent automatically?

No. The generated link opens a draft and the visitor confirms whether to send it.

Will an SMS form work on desktop?

Only when the device and browser have a compatible handler. Treat mobile as the primary case and provide a fallback.

Can an SMS form store submissions?

No. The client-side handoff does not create a FormToInbox record or hosted inbox entry.

Primary sources

Turn the guide into a working form

Start from a template, change the fields and take the code with you.

Open the free builder
Global privacy
Necessary storage

Keeps your form-builder draft and privacy choice on this device.

Always on
Sale or targeted-ad sharing

FormToInbox does not sell personal information or share it for cross-context behavioural advertising.

Off