View Categories

fluentform/shortcode_parser_callback_{smart_code_name}

Description  #

You can use this filter to return data for your custom shortcode. In this case, a custom shortcode first needs to be added using the fluentform/all_editor_shortcodes filter.

apply_filters('fluentform/shortcode_parser_callback_'.$smart_code_name, $value, $form);

Usage   #

The following would apply to all forms:

add_filter('fluentform/editor_shortcode_callback_my_own_smartcode', function ($value, $form) {
       $dynamicValue = $form->title; // We are send current form title. You can fetch any data and return
       return $dynamicValue;
}, 10, 2);

Parameters #

  • $value (String) Smartcode Name
  • $form (Object) The $form Object

Placement #

This code should be placed in the functions.php file of your active theme.

Source Code #

This filter is located in FluentForm\App\Services\FormBuilder -> getOtherData($key)