# getwid/2.0.7/includes/templates/mailchimp/field-email.php

Getwid – Gutenberg Blocks, version 2.0.7. 30 lines.

- Page: https://pluginprobe.com/plugins/getwid/2.0.7/code/includes/templates/mailchimp/field-email.php
- Raw: https://pluginprobe.com/plugins/getwid/2.0.7/raw/includes/templates/mailchimp/field-email.php
- Modified: 2022-03-16T17:06:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/getwid/2.0.7/code/includes/templates/mailchimp/field-email.php#L10-L20`.

```php
<?php
    $class = 'wp-block-getwid-field-email';
    $block_name = $class;
    if ( isset( $attributes[ 'className' ] ) ) {
        $class .= ' ' . $attributes[ 'className' ];
    }
    $uid = isset( $attributes[ 'id' ] ) ? $attributes[ 'id' ] : 'email-' . uniqid();
    $label = isset( $attributes[ 'label' ] ) ? $attributes[ 'label' ] : __( 'Email address', 'getwid' );
?>
<p class='<?php echo esc_attr( $class );?>'><?php
    if ( ! empty( $label ) ) : ?>
        <label
            for='<?php echo esc_attr( $uid ); ?>'
            class='<?php echo esc_attr( $block_name . '__label' );?>'
        ><?php
            echo wp_kses_post( $label );
        ?></label>
    <?php endif; ?>

    <input id='<?php echo esc_attr( $uid ); ?>' type='email' name='email' <?php
        if ( isset( $attributes[ 'placeholder' ] ) ) { ?>
            placeholder='<?php echo esc_attr( $attributes[ 'placeholder' ] ); ?>' <?php
        }

        if ( isset( $attributes[ 'required' ] ) ) { ?>
            required=''<?php
        } ?>
    />
</p>

```
