Noptin_Ninja_Forms::get_map_fields()

Returns an array of map fields


Source Source

File: includes/integrations/class-noptin-ninja-forms.php

	public function get_map_fields() {

		$map_fields = array(

            array(
                'name'        => 'name',
				'label'       => __( 'Subscriber Name', 'newsletter-optin-box' ),
				'placeholder' => __( "The subscriber's name", 'newsletter-optin-box' ),
            ),

            array(
                'name'        => 'email',
				'label'       => __( 'Subscriber Email', 'newsletter-optin-box' ),
				'placeholder' => __( "The subscriber's email address", 'newsletter-optin-box' ),
            ),

            array(
                'name'  => 'GDPR_consent',
				'label' => __( 'GDPR Consent', 'newsletter-optin-box' ),
				'help'  => __( 'Optional. If set, users will only join your newsletter if they consent.', 'newsletter-optin-box' ),
			),

			array(
                'name'  => 'conversion_page',
                'label' => __( 'Conversion Page', 'newsletter-optin-box' ),
            ),

        );

        foreach ( get_special_noptin_form_fields() as $name => $field ) {

            $id    = esc_attr( sanitize_html_class( $name ) );
            $type  = esc_attr( $field[0] );
            $label = wp_kses_post( $field[1] );

            if ( $type === 'text' || $type === 'checkbox' || $type === 'textarea' || $type === 'hidden' ) {

                $map_fields[] = array(
                    'name'    => $id,
                    'label'   => $label,
                );

            }

		}

		return apply_filters( 'noptin_ninja_forms_map_fields', $map_fields );

	}


Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation