Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow overriding a field's HTML name #601

Merged
merged 5 commits into from
May 31, 2020

Conversation

azmeuk
Copy link
Member

@azmeuk azmeuk commented Apr 30, 2020

Fixes #205
Brings the ability to customize a field HTML name attribute.

@azmeuk azmeuk added the enhancement New feature, or existing feature improvement label Apr 30, 2020
@azmeuk azmeuk added this to the 3.0.0 milestone Apr 30, 2020
@azmeuk azmeuk requested a review from davidism May 28, 2020 21:07
@azmeuk azmeuk force-pushed the issue-205-override-field-name branch from 0a40ce9 to 1da23cb Compare May 28, 2020 21:10
@davidism
Copy link
Member

davidism commented May 30, 2020

When passing in obj, data, or kwargs, it should match the Python name. The HTML name should only be matched for incoming form data.

clarify form vs existing data, and Python vs HTML name
@davidism
Copy link
Member

Adjusted the name matching and updated the docs.

@azmeuk going forward, use calculated == expected order for asserts, I changed them here.

@davidism davidism changed the title Issue 205 override field name Allow overriding a field's HTML name May 31, 2020
@davidism davidism merged commit 3149b38 into wtforms:master May 31, 2020
@azmeuk azmeuk deleted the issue-205-override-field-name branch October 6, 2023 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, or existing feature improvement
Development

Successfully merging this pull request may close these issues.

Override field's name attribute?
2 participants