نموذج في Cursor
اطلب من الوكيل ألا ينشئ مسار API. النموذج يتحدث مباشرة مع Formgong.
- افتح المستودع في Cursor.
- الصق الموجّه.
- تأكد أنه لا يوجد سر خادم لهذا النموذج فقط.
- صدّر CSV عندما تصل الطلبات.
Prompt
أضف نموذج تواصل يرسل إلى Formgong. لا تنشئ مسار API في هذا المستودع. POST https://formgong.com/submit access_key: fk_your_access_key الحقول: name وemail وmessage وbotcheck مخفي. مع fetch أرسل Accept: application/json وتحقق من success.
fetch
async function onSubmit(event) {
event.preventDefault();
const fields = Object.fromEntries(new FormData(event.currentTarget));
const response = await fetch("https://formgong.com/submit", {
method: "POST",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
},
body: JSON.stringify({ ...fields, access_key: "fk_your_access_key" }),
});
const result = await response.json();
if (!result.success) throw new Error(result.message || "Formgong error");
}