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

Make select2 optional and uncheck hidden fields #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chancedowns
Copy link
Contributor

I didn't see any dependencies on select2, so I added a check for it.

I also have a requirement to reset/uncheck any checkboxes in the hidden dependent fields. I wasn't sure if this is something you would want or if there's some more customizable way to allow it, so I'm open to any suggestions.

Lastly, I can break these into 2 separate pull requests if you want.

@vollnhals
Copy link
Owner

Thanks for the pull request. I will merge the first commit if you split it out into a seperate pull request.
I also would consider the second one if unchecking was configurable.

@chancedowns chancedowns mentioned this pull request Sep 2, 2014
@chancedowns
Copy link
Contributor Author

I pulled the first commit out into #10

As for the uncheck, what would you suggest to make it more configurable/usable? Maybe some type of reset config/data-attribute? Would you want to maybe persist the original value and reset it back to that, or is that making it too complicated?

@vollnhals
Copy link
Owner

After thinking about it, I think the best way would be to restore the original input states. So instead of just unchecking as you do now, I would reset each input to its original value.

The reset functionality itself would need a flag, so that the default of just hiding remains.

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.

2 participants