Skip to content

Conversation

thobiasn
Copy link

@thobiasn thobiasn commented Feb 3, 2021

Ninja forms support query strings as values. This is a requirement for my use, so I hacked this together.

I am willing to make a few changes if its needed, but most of all I'm making this pull request as I can imagine others might need the same query string functionality.

I am not a wordpress developer, so I am unsure if there is a different pre defined way we should be getting the url parameters, but this implementation works.

Last pull request was closed, due to a bug occuring if the query param value included spaces. This is fixed in this pull request

@soderlind
Copy link
Owner

Thank you for doing this. Could you please add documentation on how to use in the README.md file?

@thobiasn
Copy link
Author

thobiasn commented Feb 3, 2021

No problem, thank you for making this plugin. I will update the readme, before I do I have a quick question. I have the need to disable the range functionality and just pick a single date.

If I set set min/set max days to 0 and 1 respectively, would your intention be that this setting would only allow a single date to be set? I added a change to check if max days === 1 and if so set litepickerConfig.singleMode: 1.

I have already implemented this for my own use case. If this is indeed your intention I can add it to the new pull request along with the readme change?

@thobiasn
Copy link
Author

thobiasn commented Feb 3, 2021

Or maybe singleMode: 1 only makes sense in the case where min days === 0 and max days === 1? If you are not interested in this change, I will simply update the readme.

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