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

Access Entry Data From Custom Action

Labels

This Discussion is public

Notifications

I'm creating a custom action and have just about everything working perfectly except the dynamic content.

The action frm_trigger_my_action_name_create_action supplies action, entry, and form data to my function. How do I replace the shortcodes in the action with the entry meta?


Attachment:

You're question is a little confusing. When you say "custom action", do you mean custom form action as in these types of actions? https://formidableforms.com/knowledgebase-category/form-actions-form-submission/

Or, do you mean an add_action("some_hook", "frm_trigger_my_action_name_create_action").

Please clarify what you're trying to do.

By custom action I mean custom form action.
add_action('frm_registered_form_actions', 'register_my_action');
add_action('frm_trigger_my_action_name_create_action', 'my_action_create', 10, 3);
add_action('frm_trigger_my_action_name_update_action', 'my_action_update', 10, 3);
add_action('frm_trigger_my_action_name_delete_action', 'my_action_delete', 10, 3);

When my_action_create (and the others) is triggered it gets passed $action, $entry, and $form. The raw JSON (see previously attached photo) field in $action->post_content has all of the field shortcodes unprocessed. How do I parse the text so that [13] gets replaced with that entry’s value?

Discussion closed.