Created
August 4, 2021 22:50
-
-
Save rafiahmedd/7b5579a1d86c3cff66455813de052190 to your computer and use it in GitHub Desktop.
Number format at PDF separate shortcode
This file contains 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
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