-
Notifications
You must be signed in to change notification settings - Fork 8
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
Customize Next Button to add validations #8
Comments
I'm not sure I understand your request. You would like the button not to be disabled, but the validation to take place when the user clicks Next ? Is there a particular reason you would like this feature ? |
Ah ok, for e.g. I have a form where user enters, and then when he/she clicks next, what I want to do is in server.ui, perform validations and then display modal if validations fail, if not go to next screen. Does that make sense? |
Ah, I think I understand. Unfortunately no, this is not possible right now, if validation fails the "next" button is inactive, there's no way to perform the check at click time. And given the complexity it took to implement the current validation system, I'm not sure I would be able to modify it... |
Got it, I understand. It is a pretty good package. The workaround I am planning to do is, have an extra button on screen, have user click it and then perform validation, use a reactive variable in server.R and then show the next button in ui.R based on that. That should be possible right? |
Hmm maybe you could use an hidden input that you would update only if the form is submitted and valid, and add a validation condition on the next button based on this hidden input value ? By using |
I think this feature would be highly appreciated. You could register the following input bindings and functions
Then people could run custom validations e.g.
But yeah, this is essentially the same functionality the package already has (with js), but with maybe a bit more control for the user. Server side validation would be huge. |
Hm, I see how this could indeed be quite useful, I didn't think of it this way. I'm reopening the issue and will try to take a look at it (but with no ETA I fear...) Thanks for the clarification. |
Hi,
Is it possible to make validations when user clicks on Next and go to next screen only if the validations pass?
The text was updated successfully, but these errors were encountered: