Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rafiahmedd/7b5579a1d86c3cff66455813de052190 to your computer and use it in GitHub Desktop.
Save rafiahmedd/7b5579a1d86c3cff66455813de052190 to your computer and use it in GitHub Desktop.
Number format at PDF separate shortcode
add_filter('fluentform_response_render_input_number', function ($response, $field, $form_id, $isHtml = true) {
if (!$response ) {
return $response;
}
$fieldSettings = \FluentForm\Framework\Helpers\ArrayHelper::get($field, 'raw.settings');
$formatter = \FluentForm\Framework\Helpers\ArrayHelper::get($fieldSettings, 'numeric_formatter');
if (!$formatter) {
return $response;
}
return \FluentForm\App\Helpers\Helper::getNumericFormatted($response, $formatter);
}, 10, 4);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment