Everything you need to integrate FastForms LK into your website. No backend code required.
Get your first form up and running in under 2 minutes:
action attributeFrom your dashboard, click the New form button. Fill in:
Once created, you'll receive a unique endpoint URL like:
https://forms.mathila.web.lk/api/f/your-form-id
Point any HTML form's action attribute to your endpoint:
<form action="https://forms.mathila.web.lk/api/f/your-form-id" method="POST">
<input type="text" name="name" placeholder="Your name" required>
<input type="email" name="email" placeholder="Your email" required>
<textarea name="message" placeholder="Your message"></textarea>
<button type="submit">Send</button>
</form>
FastForms accepts any fields you send. There's no schema to configure — just add inputs with name attributes:
All field names and values are stored exactly as submitted.
Each form has a unique endpoint:
POST https://forms.mathila.web.lk/api/f/{formId}
Supports both application/x-www-form-urlencoded (default for HTML forms) and application/json content types.
const form = document.querySelector('form');
form.addEventListener('submit', async (e) => {
e.preventDefault();
const formData = new FormData(form);
const response = await fetch('https://forms.mathila.web.lk/api/f/your-form-id', {
method: 'POST',
headers: { 'Accept': 'application/json' },
body: formData,
});
const result = await response.json();
console.log(result);
});
Successful submissions return:
{
"ok": true,
"message": "Submission received successfully."
}
For native HTML form submissions (without Accept: application/json), the API will redirect to your configured redirect URL (if set).
All errors follow a consistent format:
{
"ok": false,
"error": "ERROR_CODE",
"message": "Human-readable description"
}
| Code | Status | Description |
|---|---|---|
FORM_NOT_FOUND | 404 | No form exists with this ID |
FORM_INACTIVE | 403 | Form is paused and not accepting submissions |
RATE_LIMIT_EXCEEDED | 429 | Too many submissions from this IP |
TOO_MANY_FIELDS | 400 | More than 40 fields submitted |
PAYLOAD_TOO_LARGE | 413 | Submission exceeds 25KB |
INVALID_BODY | 400 | Could not parse the request body |
EMPTY_SUBMISSION | 400 | No form fields were received |
FastForms includes built-in spam protection:
Add a hidden input field to trap bots. Real users won't see it, but bots will fill it in:
<input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off">
Submissions with a filled honeypot field are silently accepted (the bot thinks it worked) but never stored or emailed.
Each IP address is limited to 10 submissions per form per minute to prevent abuse.