ninja_forms_register_field_spam
The Ninja Forms ninja forms register field spam function.
Description
ninja_forms_register_field_spam();
Usage
if ( !function_exists( 'ninja_forms_register_field_spam' ) ) { require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/fields/spam.php'; } // NOTICE! Understand what this does before running. $result = ninja_forms_register_field_spam();
Defined (1)
The function is defined in the following location(s).
- /deprecated/includes/fields/spam.php
- function ninja_forms_register_field_spam() {
- $args = array(
- 'name' => __( 'Anti-Spam', 'ninja-forms' ),
- 'edit_function' => '',
- 'display_function' => 'ninja_forms_field_spam_display',
- 'group' => 'standard_fields',
- 'edit_label' => false,
- 'edit_label_pos' => true,
- 'edit_req' => false,
- 'edit_custom_class' => true,
- 'edit_help' => true,
- 'edit_meta' => false,
- 'sidebar' => 'template_fields',
- 'display_label' => true,
- 'edit_conditional' => true,
- 'conditional' => array(
- 'value' => array(
- 'type' => 'text',
- ),
- ),
- 'pre_process' => 'ninja_forms_field_spam_pre_process',
- 'process_field' => false,
- 'limit' => 1,
- 'edit_options' => array(
- array(
- 'name' => 'label',
- 'type' => 'text',
- 'label' => __( 'Spam Question', 'ninja-forms' ),
- 'width' => 'wide',
- 'class' => 'widefat',
- ),
- array(
- 'name' => 'spam_answer',
- 'type' => 'text',
- 'label' => __( 'Spam Answer', 'ninja-forms' ),
- 'width' => 'wide',
- 'class' => 'widefat',
- ),
- ),
- 'req' => true,
- );
- ninja_forms_register_field('_spam', $args);
- }