-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[Form] Enable empty root form name #2936
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if you have multiple forms with no name? Then multiple id="form" is also invalid.
So instead it should not render an id attribute at all when the name is empty.
Anyway where does the id attribute for the root form get rendered? I think this only applies to the individual "widgets" inside the root form.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same result you get, when you use two forms generated with 2 form builders without submitting its names. But anyway this feature has only a small amount of use cases, and I don't think anyone will render two forms with empty names in single page.
Użytkownik Tobias Schultze reply@reply.github.com napisał:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd use this on all my forms and i do have multiple forms on a page.
i see two options:
I'd prefer to not render the id attribute and leave it up to the developer to do so. SF2 is getting too "magical" :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To 1) I dont understand.
To 2) thats what I proposed. But I'm still not sure in which case and for which field the id=""?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jstout24 @Tobion this feature is a small hack, to provide support for rare use cases, when you're forced to have that form (ie. PayPal integration etc.) this should not be used as every-day practice?
@jstout24 what is yours point to have multiple forms with empty name on single page, and why to have ALL of them with empty name? IMO that's pointless...
@Tobion not rendering
id=""
at all is possible, I was thinking about it but I decided not to...I think one of you should open a ticket for it, so community can decide :) @fabpot @bschussek what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@canni ie: my current project has many forms that post via GET (reports, preview pages, etc).. So if I run a report and want to send the link to someone, it looks like:
when I'd rather have it look like:
The above example can go for way more things other than just reports. We also have forms that need to be pre-popped and it gets kind of annoying to explain to our partners that they have to do form_name[first_name] in their forms when they are always used to just passing in
?first_name=
... which a lot of our partners systems don't even allow for this functionality.... so we're then forced to create an entire new version to convert our partner's parameters to the way our form does it of our system and deploy it amongst all of our application servers (heavy process for a simple change). I mean I can probably make what we're doing better, but this is everyday use on everyday projects for us.As far as having multiple forms... you never submit a form more than once. I've always been used to having a hidden field with a "form name" and checking that on POST or GET.