Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Laura – WPMU DEV Support

    (@wpmudev-support8)

    Hi @roghithsam

    I hope you’re well today!

    Currently it’s not possible “out of the box”, I’m afraid. You can limit an overall number of submissions of the form but not “per user”.

    We already have this feature planned so it will be added to the plugin in future but I don’t have an ETA, I’m afraid.

    Meanwhile, you can try an additional custom code in form of MU plugin:

    https://pastebin.com/ZGirphTN

    To use it on site:

    – create an empty file with .php extension (e.g. “limit-form-submissions.php”)
    – copy and paste that code into it
    – You should edit the “$form_ids = array( 49, 15, 20 );” adding the ID of the Form that you want this check to work with ( you can add multiple forms as you can see as a comma separated list ). And you can also change the $message to show anything you like for a form error.
    – save the file and upload it (e.g. via FTP) to the “/wp-content/mu-plugins” folder of your WordPress installation

    This should prevent resubmission for 24 hours but you can make it longer by replacing +1 day in this line

    $future_time = strtotime( '+1 day', strtotime( $entry->date_created_sql ) );

    with e.g. +1 year

    Best regards,
    Adam

    Works like a charm. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘prevent resubmission’ is closed to new replies.