17 Premium Addons Completely Free!!

Buy ARForms Now & Get

Grab the Deal
General Settings Hooks
  • arf_outside_global_setting_block

    This action hook is useful to add additional general settings block from outside in ARForms at global settings.

  • Usage:
    add_action('arf_outside_global_setting_block', 'your_function', 10, 2);
    function your_function($settings, $active_license){
        //Do Your Action
        echo "General Settings HTML Block.";
    }
    
    Parameters:
    $settings
    Array of all general settings options and values.
    $active_license
    Active License Status.
  • arf_update_global_setting_outside

    This filter is useful to display general settings options values from outside at global settings.

  • Usage:
    add_filter('arf_update_global_setting_outside', 'your_function', 10, 2);
    function your_function($outside_settings,$values){
    
        //Display values from outside.
    
        $outside_settings['OUTSIDE-OPTION'] = $values['OUTSIDE-OPTION'];
        return $outside_settings;
    
    }
    
    Parameters:
    $outside_settings
    Array of all outside general settings options.
    $values
    Array of all outside general settings options values.
  • arf_autoresponder_global_setting_block

    This action hook is useful to add email marketing tool with its configuration options from outside in ARForms at global settings.

  • Usage:
    add_action('arf_autoresponder_global_setting_block', 'your_function', 10, 2);
    function your_function($autoresponder_types, $active_license){
        //Do Your Action
        echo "Email Marketing Tool HTML Block.";
    }
    
    Parameters:
    $autoresponder_types
    Array Of All Existing Email Marketing Tools.
    $active_license
    Active License Status.
Form Related Hooks
  • arf_import_update_field_outside

    This filter is useful to update form options from outside while importing form in ARForms.

  • Usage:
    add_filter('arf_import_update_field_outside', 'your_function', 10, 3);
    function your_function($new_option_values, $old_field_id, $form_id){
    
        //Update new options with new values.
        return $new_option_values;
    
    }
    
    Parameters:
    $new_option_values
    Array of all options values.
    $old_field_id
    Old field Id exist in exported form.
    $form_id
    Form ID.
  • include_outside_js_css_for_preview_header

    This action hook is useful to load external js/css at preview header.

  • Usage:
    add_action('include_outside_js_css_for_preview_header', 'your_function');
    function your_function(){
        //Do Your Action
        //enqueue external js/css in header.
    }
    
  • include_outside_js_css_for_preview_footer

    This action hook is useful to load external js/css at preview footer.

  • Usage:
    add_action('include_outside_js_css_for_preview_footer', 'your_function');
    function your_function(){
        //Do Your Action
        //enqueue external js/css in footer.
    }
    
  • arfbeforeupdateform

    This hook is useful to perform action before save form at form editor.

  • Usage:
    add_action('arfbeforeupdateform', 'your_function', 10, 3);
    function your_function($form_id, $values, $create_link = false){
        //Do Your Action
        echo "Form options HTML";
    }
    
    Parameters:
    $form_id
    ARForms Form id.
    $values
    All CSS and field options of form.
    $create_link
  • arfafterupdateform

    This hook is useful to perform action after save form at form editor.

  • Usage:
    add_action('arfafterupdateform', 'your_function', 10, 4);
    function your_function($form_id, $values, $create_link = false, $is_ref_form = 0){
        //Do Your Action
        echo "Form options HTML";
    }
    
    Parameters:
    $form_id
    ARForms Form id.
    $values
    All CSS and field options of form.
    $create_link
    $is_ref_form
  • arf_save_form_options_outside

    This filter is useful to save additional form options from outside in ARForms while saving form in form editor.

  • Usage:
    add_filter('arf_save_form_options_outside', 'your_function', 10, 3);
    function your_function($options, $values, $form_id){
        $options['outside_options'] = $values['outside_options'];
        return $options;
    }
    
    Parameters:
    $options
    Array Of Forms Options.
    $values
    Array of New Values of Form Options.
    $form_id
    Form ID.
  • arf_update_form_option_outside

    This filter is useful to update additional form options values from outside in ARForms while updating form in form editor.

  • Usage:
    add_filter('arf_update_form_option_outside', 'your_function', 10, 4);
    function your_function($options,$json_data,$old_value_id,$new_value_id){
        if($options['outside_options'] == $old_value_id){
            $options['outside_options'] = $new_value_id;
        }
        return $options;
    }
    
    Parameters:
    $options
    Array Of Forms Options.
    $json_data
    Array of Values of Form Options.
    $old_value_id
    Selected Field ID For Option Before.
    $new_value_id
    Selected New Field ID For Option.
  • arf_predisplay_form

    This action hook is useful to display additional content or input in form or to execute any action from outside before displaying form in front.

  • Usage:
    add_action('arf_predisplay_form', 'your_function', 10, 1);
    function your_function($form){
        //Do Your Action
        echo "Additional content or inputs.";
    }
    
    Parameters:
    $form
    Array of Form options.
  • arf_current_autoresponse_set_outside

    This filter is useful to get Opt-ins enabled status from outside to display active in Opt-ins popup at form editor.

  • Hook Type: Filter
    Usage:
    add_filter('arf_current_autoresponse_set_outside', 'your_function', 10, 2);
    function your_function($active, $data){
    
        $opt-in_data = @maybe_unserialize(isset($data[0]['OPT-IN']) ? $data[0]['OPT-IN'] : '' );
        if (isset($opt-in_data['enable']) && $opt-in_data['enable'] == 1) {
            $active = 'OPT-IN';
        }
        return $active;
    
    }
    
    Parameters:
    $active
    Active Opt-in.
    $data
    Opt-ins API data.
  • arfgetpagedfields

    This filter hook is useful to return fields from outside to be added in next/previous pages before changing page at paginated form.

  • Usage:
    add_filter('arfgetpagedfields', 'your_function', 10, 3);
    function your_function($fields, $form_id, $error = false){
        //Return field conditionally in paginated form.
        return $fields;
    }
    
    Parameters:
    $fields
    Array of all fields.
    $form_id
    Form ID.
    $error
    Error status to validate form page from outside before going to next page.
  • arf_prevent_auto_save_form

    This filter is useful to prevent Auto save form progress conditionally from outside if enabled this option for form.

  • Usage:
    add_filter('arf_prevent_auto_save_form', 'your_function', 10, 2);
    function your_function($flag, $form){
    
        //Return flag conditionally to prevent auto save form progress.
        if($form->id == 'FORM-ID') {
            $flag = true;
        }
    
        return $flag;
    
    }
    
    Parameters:
    $flag
    Flag to prevent auto save form progress.
    $form
    Array of all form options.
  • arf_after_success_massage

    This action hook is useful to display additional content after success message on submit form successfully.

  • Usage:
    add_action('arf_after_success_massage', 'your_function', 10, 1);
    function your_function($form){
        //Do Your Action
        echo "Additional content after form submision.";
    }
    
    Parameters:
    $form
    Array of form options.
  • arf_update_form_return_json_outside

    This filter is useful to return form option added from outside in ARForms which will be added in json encoded returned values after form submission.

  • Usage:
    add_filter('arf_update_form_return_json_outside', 'your_function', 10, 2);
    function your_function($json_data,$options){
        if( isset($options['outside_option']) ){
            $json_data['outside_option'] = $options['outside_option'];
        }
        return $json_data;
    }
    
    Parameters:
    $options
    Array Of Forms Options.
    $json_data
    Array of form options which are being returned in json encoded values.
  • arf_after_submit_sucess_outside

    This filter is useful to get script to be executed after form submission from outside in ARForms.

  • Usage:
    add_filter('arf_after_submit_sucess_outside', 'your_function', 10, 2);
    function your_function($return_script,$form){
    
        $return_script .= "<script type='text/javascript'>";
    
        //Script to execute after form submission.
    
        $return_script .= "</script>";
    
        return $return_script;
    }
    
    Parameters:
    $return_script
    Contains scripts to be executed after form submission.
    $form
    Array of form options.
  • arf_is_resetform_aftersubmit

    This filter is useful to return flag whether form to be reset from outside after form submission or not in ARForms.

  • Usage:
    add_filter('arf_is_resetform_aftersubmit', 'your_function', 10, 2);
    function your_function($flag, $form){
        //Return Form Reset Flag.
        $flag = false;
        return $flag;
    }
    
    Parameters:
    $flag
    Form reset flag.
    $form
    Array of form options.
  • arf_is_resetform_outside

    This filter is useful to reset form from outside after form submission in ARForms.

  • Usage:
    add_filter('arf_is_resetform_outside', 'your_function', 10, 2);
    function your_function($flag, $form){
        //Reset Form.
        $flag = false;
        return $flag;
    }
    
    Parameters:
    $flag
    Reset Form flag.
    $form
    Array of form options.
  • arf_hide_forms

    This filter hook is useful to handle form submission action to hide form from outside.

  • Usage:
    add_filter('arf_hide_forms', 'your_function', 10, 2);
    function your_function( $hide_forms, $form_id ){
        $hide = true;
        return $hide;
    }
    
    Parameters:
    $hide_forms
    Array Of Hide Forms Options.
    $form_id
    Form ID.
  • arf_check_condition_on_subscription

    This filter is useful to check if is there condition set on subscription to enable opt-ins after form submission.

  • Usage:
    add_filter('arf_check_condition_on_subscription', 'your_function', 10, 2);
    function your_function($form, $entry_id){
        //Return condition status on subscription.
        return false;
    }
    
    Parameters:
    $form
    Array of form options.
    $entry_id
    Created entry ID.
  • arf_afterdisplay_form

    This action hook is useful to append additional content for form like <style></style> or <script></script>

  • Usage:
    add_action('arf_afterdisplay_form', 'your_function', 10, 1);
    function your_function($form){
        //Do Your Action
        echo "Styling / Javascript code.";
    }
    
    Parameters:
    $form
    Array of Form options.
Fields Related Hooks
  • arfavailablefields

    This filter hook is useful to add field in Basic Form Elements list at form editor from outside which can be drag and drop in form after.

  • Usage:
    add_filter('arfavailablefields', 'your_function', 10, 1);
    function your_function($form_elements){
    
        //Add field in basic form elements list at form editor.
        $outside_field = array(
            'FIELD-TYPE' => array(
                'icon' => 'FIELD ICON',
                'label' => 'FIELD LABEL'
            )
        );
    
        return array_merge($form_elements, $outside_field);
    }
    
    Parameters:
    $form_elements
    Array of all existing form elements.
  • arfaavailablefields

    This filter hook is useful to add field in Advance Form Elements list at form editor from outside which can be drag and drop in form after.

  • Usage:
    add_filter('arfaavailablefields', 'your_function', 10, 1);
    function your_function($form_elements){
    
        //Add field in advance form elements list at form editor.
        $outside_field = array(
            'FIELD-TYPE' => array(
                'icon' => 'FIELD ICON',
                'label' => 'FIELD LABEL'
            )
        );
    
        return array_merge($form_elements, $outside_field);
    }
    
    Parameters:
    $form_elements
    Array of all existing form elements.
  • arf_new_field_array_filter_outside

    This filter is useful to add or change HTML for field control block from outside in form editor.

  • Usage:
    add_filter('arf_new_field_array_filter_outside', 'your_function', 10, 4);
    function your_function($fields, $field_icons, $json_data, $positioned_field_icons){
    
        //Add HTML for particular field.
        $field_html = array(
            'FIELD-TYPE' => 'HTML FOR FIELD'
        );
    
        return array_merge($fields, $field_html);
    
    }
    
    Parameters:
    $fields
    Array of all fields with its HTML content.
    $field_icons
    Array of all field icons.
    $json_data
    Array of JSON field data for all fields.
    $positioned_field_icons
    Array of all fields with its field icons array.
  • arf_new_field_array_materialize_filter_outside

    This filter is useful to add or change HTML for material inputs control block from outside in form editor.

  • Usage:
    add_filter('arf_new_field_array_materialize_filter_outside', 'your_function', 10, 4);
    function your_function($fields, $field_icons, $json_data, $positioned_field_icons){
    
        //Add HTML for particular material input.
        $field_html = array(
            'FIELD-TYPE' => 'HTML FOR MATERIAL INPUT BLOCK'
        );
    
        return array_merge($fields, $field_html);
    
    }
    
    Parameters:
    $fields
    Array of all fields with its material input style HTML content.
    $field_icons
    Array of all field icons.
    $json_data
    Array of JSON field data for all fields.
    $positioned_field_icons
    Array of all fields with its field icons array.
  • arf_positioned_field_options_icon

    This filter is useful to add or customize array of icons for particular field from outside.

  • Usage:
    add_filter('arf_positioned_field_options_icon', 'your_function', 10, 2);
    function your_function($positioned_field_icons, $field_icons){
    
        //Add array of field icons for particular field type.
        $positioned_field_icons[FIELD-TYPE] = "{$field_icons['field_require_icon']} {$field_icons['field_delete_icon']} {$field_icons['arf_field_move_icon']}";
    
        return $positioned_field_icons;
    
    }
    
    Parameters:
    $positioned_field_icons
    Array of all fields with its field icons array.
    $field_icons
    Array of all field icons.
  • arf_controls_added_class_outside_materialize

    This filter hook is useful to add class to the wrapper of input control from outside.

  • Usage:
    add_filter('arf_controls_added_class_outside_materialize', 'your_function', 10, 2);
    function your_function($class, $field_type){
    
        if($field_type == FIELD-TYPE)
        {
            $class .='CLASS';
        } 
        return $class;
    
    }
    
    Parameters:
    $class
    String of all classes to add in wrapper of the input control.
    $field_type
    Field type.
  • arf_input_style_label_position_outside

    This filter is useful to add field in array of fields from outside for which label style is standard in materialize form editor like Slider, Radio.

  • Usage:
    add_filter('arf_input_style_label_position_outside', 'your_function', 10, 3);
    function your_function($fields, $inputs_style, $field_type){
    
        if($inputs_style == 'material'){
            if($field_type == FIELD-TYPE){
                array_push($fields,FIELD-TYPE);
            }
        }
        return $fields;
    
    }
    
    Parameters:
    $fields
    Array of all field types for which label style is changed.
    $inputs_style
    Form Input style.
    $field_type
    Field type.
  • arf_change_json_default_data_ouside

    This filter is useful to append or change in JSON array of field data from outside for particular field.

  • Usage:
    add_filter('arf_change_json_default_data_ouside', 'your_function', 10, 1);
    function your_function($field_json){
    
        $field_data = JSON FORMAT DATA;
        $field_json['field_data']['FIELD-TYPE'] = $field_data;
        return $field_json;
    
    }
    
    Parameters:
    $field_json
    JSON array of fields data.
  • arf_form_fields_outside

    This filter is useful to append or change JSON array for default css of field from outside.

  • Hook Type: Filter
    Usage:
    add_filter('arf_form_fields_outside', 'your_function', 10, 2);
    function your_function($field_json, $input_style){
    
        foreach ($field_json->field_data as $key => $value) {                           
            foreach ($value as $data_key => $data_value) {
                if($data_key == 'KEY'){
                   $field_json->field_data->$key->$data_key = DEFAULT VALUE;
                }
            }
        }
    
        return $field_json;
    
    }
    
    Parameters:
    $field_json
    JSON array of fields data.
    $input_style
    Form inputs style.
  • arf_field_option_model_outside

    This action hook is useful to add field options for field customization in form editor which is added from outside in ARForms.

  • Usage:
    add_action('arf_field_option_model_outside', 'your_function');
    function your_function(){
        //Do Your Action
        echo "Field options HTML";
    }
    
  • arf_field_values_options_outside

    This filter is useful to add field in array of fields from outside for which Edit options icon is displayed on hover like checkbox, select at form editor.

  • Usage:
    add_filter('arf_field_values_options_outside', 'your_function', 10, 1);
    function your_function($fields){
    
        $count = count($fields);
        $fields[$count+1] = FIELD-TYPE;
        return $fields;
    
    }
    
    Parameters:
    $fields
    Array of all field types for which Edit options is enabled.
  • arf_add_more_field_options_outside

    This filter is useful to add additional field options from outside for fields in ARForms.

  • Usage:
    add_filter('arf_add_more_field_options_outside', 'your_function', 10, 2);
    function your_function($field_options, $field_type){
    
        //Add field options and value.
        if($field_type == 'FIELD-TYPE') {
            $field_options['CUSTOM-OPTION'] .= 'DEFAULT VALUE FOR CUSTOM OPTION';
        }
    
        return $field_options;
    }
    
    Parameters:
    $field_options
    All options of particular field.
    $field_type
    Field type.
  • arfcustomhtml

    This filter is useful to customize default HTML for fields from outside in form.

  • Usage:
    add_filter('arfcustomhtml', 'your_function', 10, 2);
    function your_function($default_html, $field_type){
    
        //Customize HTML For Field.
        if($field_type == 'FIELD-TYPE') {
            $default_html .= 'CUSTOMIZED HTML FOR FIELD';
        }
    
        return $default_html;
    }
    
    Parameters:
    $default_html
    Default HTML for field.
    $field_type
    Field type.
  • arfdisplayfieldhtml

    This filter hook checks if to place default field HTML for particular field type from outside.

  • Usage:
    add_filter('arfdisplayfieldhtml', 'your_function', 10, 2);
    function your_function($flag = true, $field_type){
    
        //Return flag to place default field HTML.
        if($field_type == 'FIELD-TYPE') {
            $flag = false; // Place custom HTML.
        }
    
        return $flag;
    }
    
    Parameters:
    $flag
    Default HTML flag for field.
    $field_type
    Field type.
  • arfothercustomhtml

    This filter is useful to return custom HTML for fields from outside for which field default HTML flag is false by arfdisplayfieldhtml filter.

  • Usage:
    add_filter('arfothercustomhtml', 'your_function', 10, 2);
    function your_function($default_html, $field_type){
    
        //Return Custom HTML For Field
        if($field_type == 'FIELD-TYPE') {
            $default_html .= 'CUSTOM HTML FOR FIELD';
        }
    
        return $default_html;
    }
    
    Parameters:
    $default_html
    Default HTML for field.
    $field_type
    Field type.
  • arf_outsite_print_style

    This action hook is useful to print css in maincss of form for fields which are added from outside in ARForms.

  • Usage:
    add_action('arf_outsite_print_style', 'your_function', 10, 3);
    function your_function($new_values, $use_saved = '', $form_id = ''){
        if (isset($use_saved) and $use_saved) {
            //Do Your Action While Saving Form At Editor.
            //Get All Styling Options In $new_values.
            //Print CSS.
        } else {
            //Do Your Action While Preview At Form Editor.
            //Get All Styling Options In $_REQUEST.
            //Print CSS.
        }
    }
    
    Parameters:
    $new_values
    Array of all styling options with new values while saving form in form editor.
    $use_saved
    Set flag variable while saving form in form editor.
    $form_id
    Form id which is being saved or previewed.
  • arf_change_field_icons_outside

    This filter hook is useful to change field icons from outside while importing form in ARForms.

  • Usage:
    add_filter('arf_change_field_icons_outside', 'your_function', 10, 1);
    function your_function($field_icons){
    
        //Update field_icons.
        return $field_icons;
    
    }
    
    Parameters:
    $field_icons
    Array of all field icons.
  • arf_installed_fields_outside

    This filter hook collects all field types from outside while importing form which can be skipped to import if respective addon is not active.

  • Usage:
    add_filter('arf_installed_fields_outside', 'your_function', 10, 1);
    function your_function($fields){
    
        array_push($fields,'FIELD-TYPE');
        return $fields;
    
    }
    
    Parameters:
    $fields
    Array of all outside field types.
  • arf_check_for_draw_outside

    This filter is useful to check status if is there form fields to be populated from outside in ARForms.

  • Usage:
    add_filter('arf_check_for_draw_outside', 'your_function', 10, 2);
    function your_function($flag = false, $field){
        //Return Field Populate Status.
        $flag = true;
        return $flag;
    }
    
    Parameters:
    $flag
    Reset Form flag.
    $field
    Array of field options.
  • arf_drawthisfieldfromoutside

    This filter is useful to populate form fields from outside in ARForms.

  • Usage:
    add_filter('arf_drawthisfieldfromoutside', 'your_function', 10, 4);
    function your_function($return_string, $field, $onChange_function, $data_unique_id){
        //Draw Form Field
        $return_string .= 'Form Field HTML';
        return $return_string;
    }
    
    Parameters:
    $return_string
    String containing form HTML content.
    $field
    Array of field options.
    $onChange_function
    Contains on change function if conditional logic set on field.
    $data_unique_id
    Contains field unique data id.
  • arf_default_value_array_field_type

    This filter is useful to allow to set default value checked for field added from outside in form.

  • Usage:
    add_filter('arf_default_value_array_field_type', 'your_function', 10, 1);
    function your_function($field_types){
        array_push($field_types,'FIELD-TYPE');
        return $field_types;
    }
    
    Parameters:
    $field_types
    Array Of Field Types.
  • arf_default_value_array_field_type_from_itemmeta

    This filter is useful to allow to set default value selected for field added from outside in form.

  • Usage:
    add_filter('arf_default_value_array_field_type_from_itemmeta', 'your_function', 10, 1);
    function your_function($field_types){
        array_push($field_types,'FIELD-TYPE');
        return $field_types;
    }
    
    Parameters:
    $field_types
    Array Of Field Types.
  • arf_field_wise_js_css

    This filter returns array of js and css for particular field to enqueue in form.

  • Usage:
    add_filter('arf_field_wise_js_css', 'your_function', 10, 1);
    function your_function($fields_js_css = array()){
    
        //Return JS/CSS array for particular field.
        $outside_field = array(
            'FIELD-TYPE' = array(
                'title' => 'FIELD NAME',
                'handle' => array(
                    'js' => array('FIELD-JS'),
                    'css' => array('FIELD-CSS'),
                ),
            )
        );
    
        return array_merge($fields_js_css, $outside_field);
    }
    
    Parameters:
    $fields_js_css
    Array of field wise JS and CSS.
  • arf_load_bootstrap_js_from_outside

    This action hook is useful to load external bootstrap js/css for fields which are added from outside in ARForms.

  • Usage:
    add_action('arf_load_bootstrap_js_from_outside', 'your_function', 10, 1);
    function your_function($field_type){
        if( $field_type == FIELD-TYPE ){
            //Do Your Action
            echo "enqueue external bootstrap js/css required for field.";
        }
    }
    
    Parameters:
    $field_type
    Field type loaded in form.
  • arf_check_for_running_total_field

    This filter is useful to return function for running total on change input values.

  • Usage:
    add_filter('arf_check_for_running_total_field', 'your_function', 10, 5);
    function your_function($onChange_function = '', $field = '', $data_unique_id = '', $form = '', $result_data = array()){
        //Return string of action on change values.
        $onChange_function = " onkeyup='function();'";
        return $onChange_function;
    }
    
    Parameters:
    $onChange_function
    Respective function string on change input field values.
    $field
    Array of field options.
    $data_unique_id
    Contains field unique data id.
    $form
    Array of form options.
    $result_data
    Array of Fields with its all options.
  • arf_populate_field_from_outside

    This filter hook is useful to populate field in form which is added from outside in ARForms.

  • Usage:
    add_filter('arf_populate_field_from_outside', 'your_function', 10, 3);
    function your_function($form_data, $form_id, $values){
        //$form_data Form settings values.
        //$form_id Form ID
        //$values Entry Values.
        return $form_data;
    }
    
    Parameters:
    $form_data
    Array Of Form Settings Data.
    $form_id
    Form ID.
    $values
    Fields Entry Values.
  • arfbeforefielddisplay

    This filter hook is useful to customize the field options before displaying them.

  • Usage:
    add_filter('arfbeforefielddisplay', 'your_function', 10, 1);
    function your_function($field){
        //modify the field here
        return $field;
    }
    
    Parameters:
    $field
    ARForms field options.
  • arfafterdisplayfield

    This hook is useful to customize fields displaying at preview and front page.

  • Usage:
    add_action('arfafterdisplayfield', 'your_function', 10, 1);
    function your_function($field){
        //Do Your Action
        echo "Form field HTML";
    }
    
    Parameters:
    $field
    ARForms field options.
  • arfgetdefaultvalue

    This filter hook is useful to change or set default value for fields from outside.

  • Usage:
    add_filter('arfgetdefaultvalue', 'your_function', 10, 2);
    function your_function($default_value = '', $field){
        //Filter your fields default value.
        if($field->type == 'FIELD-TYPE' ){
            $default_value = 'SET DEFAULT VALUE';
        }
        return $default_value;
    }
    
    Parameters:
    $default_value
    Default value of field.
    $field
    Array of all options of fields.
  • arfsetupnewentry

    This filter is useful to change value or default value or other options of fields from outside before displaying form.

  • Usage:
    add_filter('arfsetupnewentry', 'your_function', 10, 1);
    function your_function($values){
    
        //Customize form or field options.
        return $values;
    }
    
    Parameters:
    $values
    Array of form fields and options.
  • arfsetupnewfieldsvars

    This filter hook is useful to customize field values from outside.

  • Usage:
    add_filter('arfsetupnewfieldsvars', 'your_function', 10, 2);
    function your_function($values, $field){
    
        //Customize field values.
        return $values;
    }
    
    Parameters:
    $values
    Array of all field values.
    $field
    Array of field options.
  • arf_disply_required_field_outside

    This filter hook is useful to change required status of field from outside.

  • Usage:
    add_filter('arf_disply_required_field_outside', 'your_function', 10, 2);
    function your_function($required_flag, $field){
        if ($field['type'] == 'FIELD-TYPE') {
            $required_flag = false;
        }
        return $required_flag;
    }
    
    Parameters:
    $required_flag
    Flag for required status of field.
    $field
    Array of field options.
  • arf_onchange_only_click_event_outside

    This field is useful to add outside field in array of fields for which onChange event is binded to count running total values.

  • Usage:
    add_filter('arf_onchange_only_click_event_outside', 'your_function', 10, 1);
    function your_function($field_types){
        array_push($field_types,'FIELD-TYPE');
        return $field_types;
    }
    
    Parameters:
    $field_types
    Array of field types for which onChange event is binded.
  • arfbeforereplaceshortcodes

    This filter is useful to replace custom HTML shortcodes with original HTML content from outside before populating field in form.

  • Usage:
    add_filter('arfbeforereplaceshortcodes', 'your_function', 10, 4);
    function your_function($html, $field, $error, $form){
    
        //Replace HTML For shortcodes in field HTML.
        if($field['type'] == 'FIELD-TYPE') {
            $html = str_replace('[CUSTOMCONTENT]', 'CUSTOMCONTENTHTML', $html);
        }
    
        return $html;
    }
    
    Parameters:
    $html
    HTML of field before populating in form.
    $field
    Array of field options.
    $error
    Error flag to restrict field to be populated in form.
    $form
    Array of form options.
  • arfreplaceshortcodes

    This filter is useful to replace shortcode in field HTML from outside in ARForms.

  • Usage:
    add_filter('arfreplaceshortcodes', 'your_function', 10, 5);
    function your_function($html,$field,$fields,$errors,$form){
    
        //Replace shortcodes with field HTML.
        if($field['type'] == 'FIELD-TYPE') {
            $html = str_replace('[SHORTCODE]', 'HTML CONTENT', $html);
        }
    
        return $html;
    }
    
    Parameters:
    $html
    HTML of field before populating in form.
    $field
    Array of field options.
    $fields
    Array of all fields.
    $errors
    Array of errors for field.
    $form
    Array of form options.
  • arffieldsreplaceshortcodes

    This filter hook is useful to replace shortcode with particular entry values in field entry.

  • Usage:
    add_filter('arffieldsreplaceshortcodes', 'your_function', 10, 4);
    function your_function($value, $tag, $atts, $field){
    
        //Replace shortcodes with field HTML.
        if($field->type == 'FIELD-TYPE') {
            $value = str_replace('[SHORTCODE]', $atts['entry_id'], $value);
        }
    
        return $value;
    }
    
    Parameters:
    $value
    Field entry value containing shortcodes.
    $tag
    Array of tags.
    $atts
    Array of entry values.
    $field
    Array of field options.
Validation Related Hooks
  • arf_validateform_outside

    This filter is useful to get flag whether form fields are to be validated from outside or not.

  • Usage:
    add_filter('arf_validateform_outside', 'your_function', 10, 2);
    function your_function($flag, $form){
        //Validate field values.
        $flag = true;
        return $flag;
    }
    
    Parameters:
    $flag
    Validation status.
    $form
    Array of form options.
  • arf_is_validateform_outside

    This filter is useful to validate form fields from outside in ARForms.

  • Usage:
    add_filter('arf_is_validateform_outside', 'your_function', 10, 2);
    function your_function($flag, $form){
        //Validate field values.
        $flag = true;
        return $flag;
    }
    
    Parameters:
    $flag
    Field values validation status.
    $form
    Array of form options.
  • arf_validate_form_outside_errors

    This filter hook is useful to validate field in form from outside in ARForms.

  • Usage:
    add_filter('arf_validate_form_outside_errors', 'your_function', 10, 4);
    function your_function($errors, $form_id, $values, $form_data = array()){
        //Validate Form or Fields.
        return $errors;
    }
    
    Parameters:
    $errors
    Array Of Error Messages.
    $form_id
    Form ID.
    $values
    Fields Entry Values.
    $form_data
    Array Of Form Settings Data.
Entries Related Hooks
  • arf_prevent_duplicate_entry

    This filter is useful to prevent form submission entry from outside in ARForms.

  • Usage:
    add_filter('arf_prevent_duplicate_entry', 'your_function', 10, 3);
    function your_function($error_message, $form_id, $values){
        //$error_message Error Message to display.
        $prevent_entry = true;
        return $prevent_entry;
    }
    
    Parameters:
    $error_message
    Error Message to display to prevent form submission entry.
    $form_id
    Form ID.
    $values
    Array of fields entries.
  • arfbeforecreateentry

    This hook is useful to perform any action before create entry on submit form.

  • Usage:
    add_action('arfbeforecreateentry', 'your_function', 10, 1);
    function your_function($values){
        //Do Your Action
    }
    
    Parameters:
    $values
    Array of values entered in form fields.
  • arf_before_create_formentry

    This filter hook is useful to customize entry to be created after form submission before inserting in database.

  • Usage:
    add_filter('arf_before_create_formentry', 'your_function', 10, 1);
    function your_function($entry){
    
        //Customize array of entry.
        return $entry;
    
    }
    
    Parameters:
    $entry
    Array of entry to be created after form submission.
  • arfaddentrymeta

    This filter is useful to change field entry values before inserting in database from outside.

  • Usage:
    add_filter('arfaddentrymeta', 'your_function', 10, 1);
    function your_function($values){
        //Change field entry value.
        return $values;
    }
    
    Parameters:
    $values
    Array of field entry.
  • arfaftercreateentry

    This hook is useful to get form entries and perform any action after create entry of submitted form.

  • Usage:
    add_action('arfaftercreateentry', 'your_function', 10, 2);
    function your_function($entry_id, $form_id){
        //Do Your Action
    }
    
    Parameters:
    $entry_id
    Created Entry Id.
    $form_id
    Submitted Form Id.
  • arf_after_create_formentry

    This filter hook is useful if to perform action or to prevent further actions to be performed after form submission using created entry data from outside.

  • Usage:
    add_filter('arf_after_create_formentry', 'your_function', 10, 2);
    function your_function($entry_id, $form_id){
    
        $entry_id = false; //Prevent further action to perform after form submission.
        return $entry_id;
    
    }
    
    Parameters:
    $entry_id
    Entry ID created after form submission.
    $form_id
    Form ID.
  • arfdisplayvalue

    This filter is useful to display customized entry value from outside in preview as well as in grid of form entries.

  • Usage:
    add_filter('arfdisplayvalue', 'your_function', 10, 3);
    function your_function($value, $field, $atts){
    
        //Customize particular field entry value.
        if($field->type == 'FIELD-TYPE'){
            $value = 'CUSTOMIZE ENTRY VALUE';
        }
    
        return $value;
    }
    
    Parameters:
    $value
    Entry value for particular field.
    $field
    Array of field options.
    $atts
    Array of other values in entry.
  • arfdisplayvaluecustom

    This filter is useful to display customized entry value from outside in preview of form entries.

  • Usage:
    add_filter('arfdisplayvaluecustom', 'your_function', 10, 3);
    function your_function($value, $field, $atts){
    
        //Customize particular field entry value.
        if($field->type == 'FIELD-TYPE'){
            $value = 'CUSTOMIZE ENTRY VALUE';
        }
    
        return $value;
    }
    
    Parameters:
    $value
    Entry value for particular field.
    $field
    Array of field options.
    $atts
    Array of other values in entry.
  • arf_before_destroy_entry

    This filter is useful to perform action like to remove uploaded file from upload directory while deleting entry.

  • Usage:
    add_filter('arf_before_destroy_entry', 'your_function', 10, 1);
    function your_function($entry_id){
    
        //Remove uploaded file with this entry.
        return $entry_id;
    
    }
    
    Parameters:
    $entry_id
    Entry ID to be destroyed.
  • arf_after_destroy_entry

    This filter hook is useful to prevent to throw error even entry is not deleted successfully.

  • Usage:
    add_filter('arf_after_destroy_entry', 'your_function', 10, 1);
    function your_function($result){
    
        //If query execution has error
        $result = true;
        return $result;
    
    }
    
    Parameters:
    $result
    Result of query execution to delete entry.
Email Related Hooks
  • arf_change_autoresponse_selected_email_label_in_outside

    This filter is useful to change field label to be displayed at email address options list in Email Notifications popup at form editor.

  • Hook Type: Filter
    Usage:
    add_filter('arf_change_autoresponse_selected_email_label_in_outside', 'your_function', 10, 3);
    function your_function($selected_field_label, $form_id, $values){
    
        //Change for field label.
        return $selected_field_label;
    
    }
    
    Parameters:
    $selected_field_label
    Field label of selected field for email address.
    $form_id
    Form ID.
    $values
    Email Notification options values.
  • arf_change_autoresponse_selected_email_value_in_outside

    This filter is useful to change on selected field id for email address where email is to be sent at Email Notifications popup.

  • Hook Type: Filter
    Usage:
    add_filter('arf_change_autoresponse_selected_email_value_in_outside', 'your_function', 10, 3);
    function your_function($email_field, $form_id, $values){
    
        //Change for field id.
        return $email_field;
    
    }
    
    Parameters:
    $email_field
    Field ID selected for email address where email is to be sent.
    $form_id
    Form ID.
    $values
    Email Notification options values.
  • arfemailheader

    This filter hook is useful to change email header information from outside before seding an email after form submission.

  • Usage:
    add_filter('arfemailheader', 'your_function', 10, 2);
    function your_function($header, $header_array){
    
        //append header information.
        $header[] = 'ADD HEADER INFORMATION FOR SENDING MAIL.';
        return $header;
    
    }
    
    Parameters:
    $header
    Array of header information.
    $header_array
    Array of particular values like To email address, Subject.
  • arfbefore_autoresponse_chnage_mail_address_in_out_side

    This filter is useful to change email address from outside where email is to be sent.

  • Usage:
    add_filter('arfbefore_autoresponse_chnage_mail_address_in_out_side', 'your_function', 10, 4);
    function your_function($to_email, $email_field, $entry_id, $form_id){
        //Change To email address.
        $to_email = 'CHANGE EMAIL ADDRESS';
        return $to_email;
    }
    
    Parameters:
    $to_email
    Email address where email is to be sent.
    $email_field
    Field ID mapped with To email address option from form editor.
    $entry_id
    Created entry ID after form submission.
    $form_id
    Form ID.
  • arfbefore_autoresponse_send_mail_body

    This filter hook is useful to customize email body content from outside before sending to the user.

  • Usage:
    add_filter('arfbefore_autoresponse_send_mail_body', 'your_function', 10, 3);
    function your_function($mail_body, $entry_id, $form_id){
        //Customize email body content.
        $mail_body = str_replace('[SHORTCODE]', 'CUSTOM VALUES', $mail_body);
        return $mail_body;
    }
    
    Parameters:
    $mail_body
    Email body content.
    $entry_id
    Created entry ID after form submission.
    $form_id
    Form ID.
  • arfbefore_admin_send_mail_body

    This filter hook is useful to customize email body content from outside before sending to the admin.

  • Usage:
    add_filter('arfbefore_admin_send_mail_body', 'your_function', 10, 3);
    function your_function($mail_body, $entry_id, $form_id){
        //Customize email body content.
        $mail_body = str_replace('[SHORTCODE]', 'CUSTOM VALUES', $mail_body);
        return $mail_body;
    }
    
    Parameters:
    $mail_body
    Email body content.
    $entry_id
    Created entry ID after form submission.
    $form_id
    Form ID.
  • arfautoresponderattachment

    This filter hook is useful to add/change attachments from outside to be sent with an email to user.

  • Usage:
    add_filter('arfautoresponderattachment', 'your_function', 10, 3);
    function your_function($attachments, $form, $entry){
    
        //Add or Customize Attachments.
        $attachments[] = 'ADD NEW ATTACHEMENT';
        return $attachments;
    
    }
    
    Parameters:
    $attachments
    Array of attachments to be sent with an email.
    $form
    Array of form options.
    $entry
    Particular entry result fetched from database.
  • arfnotificationattachment

    This filter hook is useful to add/change attachments from outside to be sent with an email.

  • Usage:
    add_filter('arfnotificationattachment', 'your_function', 10, 3);
    function your_function($attachments, $form, $entry){
    
        //Add or Customize Attachments.
        $attachments[] = 'ADD NEW ATTACHEMENT';
        return $attachments;
    
    }
    
    Parameters:
    $attachments
    Array of attachments to be sent with an email.
    $form
    Array of form options.
    $entry
    Particular entry result fetched from database.
  • arfemailvalue

    This filter is useful to customize displaying values for fields in mail content from outside.

  • Usage:
    add_filter('arfemailvalue', 'your_function', 10, 3);
    function your_function($entry_value, $field, $entry){
    
        //Customize entry values.
        $entry_value = 'CUSTOMIZE ENTRY VALUE';
        return $entry_value;
    
    }
    
    Parameters:
    $entry_value
    Array of entry value of particular field.
    $field
    Array of field options and entry values.
    $entry
    Particular entry result fetched from database.
  • arf_brfore_send_mail_chnage_value

    This filter hook is useful to change or customize field entry values from outside before sending mail after form submission successfully.

  • Usage:
    add_filter('arf_brfore_send_mail_chnage_value', 'your_function', 10, 3);
    function your_function($field, $entry_id, $form_id){
    
        //Customize field values.
        if($field->field_type == 'FIELD-TYPE'){
            $field->entry_value = 'CUSTOMIZE ENTRY VALUE';
        }
    
        return $field;
    }
    
    Parameters:
    $field
    Array of field options and entry values.
    $entry_id
    Entry ID created after form submission.
    $form_id
    Form ID.
Export Related Hooks
  • arfcsvwhere

    This filter hook is useful to get records filtered to be exported in CSV file by returning where clause for database query.

  • Usage:
    add_filter('arfcsvwhere', 'your_function', 10, 2);
    function your_function($where_clause = '', $form_ids){
        //Return where condition to get records exported in CSV.
        $where_clause .= 'WHERE CLAUSE';
        return $where_clause;
    }
    
    Parameters:
    $where_clause
    Where clause to get records to be exported in CSV file.
    $form_ids
    Array of Form Ids.
  • arfcsvvalue

    This filter hook is useful to customize values from outside to be exported in CSV File.

  • Usage:
    add_filter('arfcsvvalue', 'your_function', 10, 2);
    function your_function($checked_values, $fields_col = array()){
        //Filter your fields value.
        return $checked_values;
    }
    
    Parameters:
    $checked_values
    Array of field values.
    $fields_col
    Array of columns for records in CSV File.
  • arfcsvdateformat

    This filter hook is useful to change date format for Timestamp in exported CSV file.

  • Usage:
    add_filter('arfcsvdateformat', 'your_function', 10, 1);
    function your_function($datetime_format = 'Y-m-d H:i:s'){
        $datetime_format = 'd-m-Y H:i:s';
        return $datetime_format;
    }
    
    Parameters:
    $datetime_format
    Date format for timestamp in exporting CSV File.
Add-ons Hooks
  • wp_arf_footer

    This action hook is useful to load external js/css for fields which are added from outside in ARForms.

  • Usage:
    add_action('wp_arf_footer', 'your_function', 10, 1);
    function your_function($loaded_fields){
        //Do Your Action
        //enqueue external js/css required for field.
    }
    
    Parameters:
    $loaded_fields
    Array of all field types loaded in form.

© 2024 Repute InfoSystems - All Rights Reserved.