Action Hook Field in WP Fluent Form WordPress Plugin

Action Hook is an option for developers to add the dynamic elements they want. It provides the chance to add whatever input type you want to add in this form. This way, you can bind your own functions to render the form to this action hook.

To add this field to your form, drag and drop the Action Hook button from the Advanced input fields.

Action Hook WP Fluent Form WordPress Plugin WPManageNinja

To enable customization, click on the edit icon you get when hovering over the field. Or click on the Input Customization tab in right sidebar when the field is selected.

Action Hook WP Fluent Form WordPress Plugin WPManageNinja

Then you will be taken to Input Customization section. The Input Customization section allows you to customize your field ultimately.

In Input Customization section, you will find some different options like–

1.General Fields.   2. Advanced Fields

General Settings

In General, settings, put the hook name to hook something to this place.

You’ll be given 3 parameters to play with: $form_id, $post_id, $form_settings.

add_action(‘HOOK_NAME’, ‘your_function_name’, 10, 3 );
function your_function_name( $form_id, $post_id, $form_settings ) {
   // do whatever you want
}

Action Hook WP Fluent Form WordPress Plugin WPManageNinja

Action Hook WP Fluent Form WordPress Plugin WPManageNinja

Action Hook WP Fluent Form WordPress Plugin WPManageNinja

Advanced Options

The advanced options available for Action Hook are as followed:

  • Element Class: Add custom CSS classes to the input field itself.
  • Conditional Logic: You can create certain rules to dynamically hide/show the input field based on the values from some other fields. To get a better understanding of Conditional Logic, read this.
Tags , ,

Was this article helpful to you?

4

How can we help?