Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

autocomplete=”email” used as fallback for all input fields

$
0
0

Replies: 0

In line 44 of /rapidmail-newsletter-software/templates/subscription-form.phtml
the attribute autocomplete="email" is used as fallback for all fields.

This leads to a strange behavior because beside the name email also firstname and lastname are getting this attribute.

Can you add the following code in future versions to avoid that?

<?php elseif ($field_name === 'email'): ?>
                    <li rel="<?php echo $field_name; ?>">
                        <label for="rm-<?php echo $field_name; ?>"><?php echo \esc_html($field_config['label']); ?><?php if ($field_config['constraints']['required']): ?><span class="required">*</span><?php endif; ?></label>
                        <input id="rm-<?php echo $field_name; ?>" name="<?php echo $field_name; ?>" type="text" autocomplete="email"<?php if (!empty($field_config['constraints']['maxlength'])): ?> maxlength="<?php echo $field_config['constraints']['maxlength']; ?>"<?php endif; ?>>
                    </li>
                <?php else: ?>
                    <li rel="<?php echo $field_name; ?>">
                        <label for="rm-<?php echo $field_name; ?>"><?php echo \esc_html($field_config['label']); ?><?php if ($field_config['constraints']['required']): ?><span class="required">*</span><?php endif; ?></label>
                        <input id="rm-<?php echo $field_name; ?>" name="<?php echo $field_name; ?>" type="text"<?php if (!empty($field_config['constraints']['maxlength'])): ?> maxlength="<?php echo $field_config['constraints']['maxlength']; ?>"<?php endif; ?>>
                    </li>
                <?php endif; ?>

`


Viewing all articles
Browse latest Browse all 59525

Trending Articles