This repository was archived by the owner on Dec 12, 2021. It is now read-only.
Uses length validation to hide add link when you reach maximum # of nested objects#46
Open
SebastianEdwards wants to merge 1 commit into
Open
Uses length validation to hide add link when you reach maximum # of nested objects#46SebastianEdwards wants to merge 1 commit into
SebastianEdwards wants to merge 1 commit into
Conversation
…ts as defined in length validation.
Owner
|
Cool idea. Anyone want to add this to the prototype javascript file? |
|
Works perfectly! What do I have to change if I want to hide the remove links for a data minimum, though? |
|
Has this been added to the most recent commit? |
|
Sad to see this wither on the vine. Would be very helpful! |
Contributor
|
I migrated a lot of this work forward. Will be ready by EOW. Backwards compatible. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Hides the add link when reaches maximum number of nested objects as defined in length validation. Ie.
Adds the attribute 'data-maximum' to the link and checks this against the number of visible nested entries on both add and remove and also on page load.
Have changed jQuery template only as am not familiar with Prototype. Probably should be altered to bind to the 'nested:fieldAdded' and 'nested:fieldRemoved' triggers.
Hope this is useful.