Skip to content

Instantly share code, notes, and snippets.

@nkb-bd
Created August 18, 2022 05:54
Show Gist options
  • Save nkb-bd/a251b5fd2d98de1d4f688c4ecbeab19d to your computer and use it in GitHub Desktop.
Save nkb-bd/a251b5fd2d98de1d4f688c4ecbeab19d to your computer and use it in GitHub Desktop.
/*
* Input Default Values form url array values
* {thrivecart.customer.email}
*/
add_filter('fluentform_editor_shortcode_callback_group_thrivecart', function ($handler, $form, $handlerArray) {
$handler = \FluentForm\App\Services\FormBuilder\EditorShortcodeParser::parseValue($handler);
$handlerKey = array_pop($handler);
if (!$handlerKey) {
return '';
}
$urlValue = FluentForm\Framework\Helpers\ArrayHelper::get($_GET, $handlerKey);
//sanitize here as your need
return $urlValue;
}, 10, 3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment