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

[FIX] Format Name Attr correctly #780

Closed

Conversation

berniechiu
Copy link

@berniechiu berniechiu commented Jul 21, 2018

Description

This might resolve #736

@@ -317,9 +317,7 @@ const FormBuilder = function(opts, element) {
field = Object.assign({}, $field)
}

if (!field.name) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this check, what happens when saved data is loaded? will it replace the name?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I found utils.nameAttr() output to be the same as field.name in most cases, maybe I'll look into more. Because I thought the FormBuilder generated that value automatically.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does generate it if one isn't set. My concern was that if an existing form was loaded, the saved value could be overwritten. If a user sets a custom name, that custom value would be overwritten.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, i've check the field name inside name utility function

@berniechiu berniechiu closed this Sep 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

the name of a multi file upload should be an array
2 participants