Multiple entries duplicates

By: Jeroen D.L. | Asked: 12/05/2023
ForumsCategory: Code HelpMultiple entries duplicates
Jeroen D.L. asked 4 months ago
Hi all Problem:
We regularly receive duplicate registrations, orders, etc. via our formidable forms. Solution: (which doesn't work 100%)
After some research we found a code to prevent this. For example:
add_filter('frm_time_to_check_duplicates', 'change_duplicate_time_limit_one_form', 10, 2); function change_duplicate_time_limit_one_form( $time_limit, $entry_values ) { if ( $entry_values['form_id'] == 100 ) { //change 100 to your form ID $time_limit = 31536000; } return $time_limit; }
However, we still sometimes receive some duplicate entries. But the biggest problem is that this code is always visible somewhere on our web pages.
They are somewhere on top, bottom or in the middle of a page. How can we avoid the code being displayed on a page but still running? Are there better alternatives to solve this problem? PS: What kind of code is this? PHP? Javascript? ... Best regards
Jeroen
Attachments
2 Answers
Victor Font answered 4 months ago
Where did you place the code? PHP code should never display on the front end. You've done something wrong.
Victor Font replied 4 months ago

PHP code needs to be placed in functions.php, a code snippet plugin, or a custom PHP library of your own design. PHP executes on the server. It never shows on the front end unless you've written out as text.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right