MuxForms on Expo Router uses a contact screen that POSTs JSON to the submit API with field names matching your dashboard schema. Pair with a website embed using the same form id for unified support intake.
Docs
Expo Router keeps navigation in the filesystem—your contact screen is just another route that calls fetch on submit.
| File | Role |
|---|---|
| app/contact.tsx | Form UI + submit |
| app.json extra | Public form id only |
| Secret | Server or EAS secret—not in git |
| platform field | ios | android in JSON |
import { useState } from "react";
import { View, TextInput, Button, Alert } from "react-native";
const FORM_ID = "FORM_UUID";
export default function ContactScreen() {
const [email, setEmail] = useState("");
const [message, setMessage] = useState("");
async function onSubmit() {
const res = await fetch(`https://www.muxforms.com/api/v1/forms/${FORM_ID}/submit`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email, message, platform: "expo", _hp: "" }),
});
if (!res.ok) {
Alert.alert("Could not send", "Try again or email support.");
return;
}
Alert.alert("Sent", "We will reply soon.");
}
return (
<View style={{ padding: 16, gap: 12 }}>
<TextInput placeholder="Email" autoCapitalize="none" value={email} onChangeText={setEmail} />
<TextInput placeholder="Message" multiline value={message} onChangeText={setMessage} />
<Button title="Send" onPress={onSubmit} />
</View>
);
}The sample omits Authorization for local schema testing. Production apps should attach the ingest secret from a secure proxy—see /docs/api.
Related: React Native reference.
Same form id as your marketing embed.
Upgrade to Pro