Added collection of FormItemArgs for each of the form FormItem types#300
Open
mikeschinkel wants to merge 1 commit intorivo:masterfrom
Open
Added collection of FormItemArgs for each of the form FormItem types#300mikeschinkel wants to merge 1 commit intorivo:masterfrom
mikeschinkel wants to merge 1 commit intorivo:masterfrom
Conversation
Contributor
Author
|
I wanted to follow up with some links showing this feature in action: |
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.
After working with Forms for a while and requesting several PRs to make working with them easier I finally had enough with the complexity and decided to implement an alternate method to add form fields than
<form>.AddInputField(),<form>.AddPasswordField(),<form>.AddDropdown(), and<form>.AddCheckbox().The *biggest problem I was trying to fix were that once a field was added it was tedious to then access the form to set other properties not allow to be set in the
FormItemsNew...()method. So I tried numerous iterations with the absolute requirement of backward compatibility and came up with the following, by example:I would have preferred to use the names
AddInputField()etc. but could not do so w/o breaking old code so I extendedAddFormItem()instead.There is also a ton of effectively duplicated code, but given the structure of the existing code I could not find a way to consolidate code without breaking backward compatibility. If breaking backward compatibility is an option, I could change the code to be more maintainable, but I needed the functionality and I assumed you would be much less likely to access broken backward compatibility so I went ahead and implemented as is.
Hopefully you will concur this is a good addition to tview and accept this PR? Thanks in advance for considering.