Last active
September 8, 2021 05:10
-
-
Save nkb-bd/32d1060d10a2bc03a09d9545e41e0aee to your computer and use it in GitHub Desktop.
Randomize the form Inputs of FluentForms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add this function to function.php and change target form ID | |
add_filter('fluentform_rendering_form', function ($form) { | |
// change form ID | |
$targetFormId = 108; | |
if ($form->id != $targetFormId) { | |
return $form; | |
} | |
shuffle($form->fields['fields']); | |
return $form; | |
}, 10, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment