Skip to content

Instantly share code, notes, and snippets.

@aimahdi
Created October 18, 2024 05:52
Show Gist options
  • Save aimahdi/d4824da897bdaa1aae09fc2b234e960d to your computer and use it in GitHub Desktop.
Save aimahdi/d4824da897bdaa1aae09fc2b234e960d to your computer and use it in GitHub Desktop.
add_filter('fluentform/shortcode_defaults', function($data, $atts) {
$formId = \FluentForm\Framework\Helpers\ArrayHelper::get($atts, 'id');
if ($formId) {
$form = \FluentForm\App\Models\Form::find($formId);
// check form and do your work and return null;
return null;
}
return $data;
}, 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment