enhancement(fields): add autocomplete attributes to form fields#816
Merged
dannyvankooten merged 1 commit intoibericode:mainfrom Feb 16, 2026
Merged
Conversation
- Add autocomplete support to form field wizard - Add autocomplete='given-name' for FNAME - Add autocomplete='family-name' for LNAME - Add autocomplete='email' for EMAIL - Add autocomplete='email' to default form content - Update built assets Fixes ibericode#777
Member
|
Looks good @faisalahammad - thank you for the contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Summary
Added
autocompleteattributes to the form field generator and default form content to improve accessibility and user experience by allowing browsers to autofill user information.📋 Issue Reference
Fixes #777
🔍 Problem Description
Current Behavior
Mailchimp for WordPress form fields (Email, First Name, Last Name) do not have
autocompleteattributes. This prevents browsers and password managers from reliably identifying these fields and offering autofill suggestions.Expected Behavior
autocomplete="email".autocomplete="given-name".autocomplete="family-name".✨ Solution Overview
Approach Taken
field-manager.jsto include theautocompleteproperty.field-generator.jsto render theautocompleteattribute.config/default-form-content.phpto includeautocomplete="email".🔧 Changes Made
Files Modified
assets/src/js/admin/form-editor/fields.js: Addedautocompleteproperty toFieldobject.assets/src/js/admin/form-editor/field-manager.js: Configured defaultautocompletevalues.assets/src/js/admin/form-editor/field-generator.js: Updated generator to output the attribute.config/default-form-content.php: Addedautocomplete="email".Detailed Changes
1. Generated Form HTML (
config/default-form-content.php)Before:
After:
2. Field Generator Logic (
field-generator.js)Before:
After:
3. Field Manager Definitions (
field-manager.js)Before:
After:
🧪 Testing Performed
Manual Testing
config/default-form-content.phpcontains the correct HTML attribute.npm run buildto ensure assets compile correctly.✅ No breaking changes - Fully backward compatible. Existing forms will remain unchanged until updated by the user.
Plugin Zip
mailchimp-for-wordpress-en777.zip
✅ PR Checklist