Setting Up Timetrap in Comfyform
Step 1: Implement Timetrap Field in Your Form
Integrate Timetrap into your forms with this HTML input:PAGELOAD_TIMESTAMP_HERE
with the actual timestamp at the moment the page loads. Timetrap utilizes the standard RFC 3339 format for datetime values to monitor the time interval between form load and submission. Comfyform expects submissions to include a timestamp in either of these precise examples of RFC 3339 formats:
- UTC:
2024-01-22T10:36:59.906157Z
- With offset:
2024-01-22T11:36:59.906157+01:00
How to get the timestamp at the page load?
- Server-side rendered websites
- Static pages or JavaScript-dependent websites
Generate the timestamp on the backend and pass the value to the final HTML code of the page. Below is an example implementation in PHP. If you changed your timetrap field name, you need to update the
name
attribute to the correct field value.Step 2: Enable the Timetrap Security in Comfyform
- Log into your Comfyform dashboard.
- Navigate to the Forms section and open the form you wish to secure.
- Select the form you’d like to secure with Timetrap field.
- Click on the Security tab.
- Locate the Timetrap section and click the “Activate” or “Modify” button.
- Optional: You can change the Timetrap field name which can improve the protection efficiency. If you change it, you need to correspondingly update the
name
attribute of the field from the Step 1. - Set a minimum time threshold in seconds, which is the time that must elapse before a form submission is considered legitimate. A typical starting point is 5 seconds.
- Click the Save changes button to apply the changes.
How to Determine the Ideal Time ThresholdChoosing the right time threshold for Timetrap involves a balance between security and user experience. Consider the complexity of your form—longer forms may require more time to fill out. A common starting point is 5-10 seconds, but you can adjust this based on testing:
- Analyze Form Length: Consider how many fields there are and how much time an average user would need to complete the form.
- Conduct User Testing: Have real users test the form to gauge how long it takes them to fill it out comfortably.
- Monitor Submissions: After implementation, observe the submission times of genuine users versus flagged entries. Adjust accordingly.
- Iterate and Optimize: Over time, fine-tune the threshold based on the form’s performance—it’s not a ‘set-it-and-forget-it’ setting.
Testing Your Timetrap Setting
Ensure Timetrap functionality meets your standards:- Attempt a submission before the set threshold to ensure it is blocked or flagged as spam.
- Complete a submission after the threshold to ensure legitimate entries are accepted.