The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group

Slack Signup
Newsletter Optin
Help Desk

PHP function for processing Formidable shortcodes

Labels

This Discussion is public

Notifications

I'm attempting to create a custom action.  The custom action has a text box setting that allows for entering field shortcodes to get a value entered when the form is submitted.  Does anyone know if there is a built-in PHP function that would take the string set in the text box setting and process any Formidable shortcodes contained inside it?

Example:
Let's say I have a field for chapter name.  The field ID is 100.  Also, I have a field for chapter city and it has a field ID of 200.  I entered [100][200] for the custom action text box setting.  A user submits the form and enters 'chapter1' for field 100 and 'atlanta' for field 200.

In code, I have the custom action value ('[100][200]') in a string variable so I'm wondering if there is a function that would allow me to do something like this:

$result = some_formidable_php_function($custom_action_setting_value);

and $result would then contain the following string: chapter1atlanta

Thanks in advance!

I can answer this myself...I found it shortly after posting this.  The following function does it:

FrmFieldsHelper::basic_replace_shortcodes( $custom_action_field, $form, $entry );

Discussion closed.