• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Shiny slickR, don’t advance slide if input is empty

Resolved: Shiny slickR, don’t advance slide if input is empty

0
By Isaac Tonny on 15/03/2023 Issue
Share
Facebook Twitter LinkedIn

In this post, we will see how to resolve Shiny slickR, don’t advance slide if input is empty

Question:

I have a shiny app where I have a slick slideshow and inputs that are associated with each image. The user will put in their name and then guess the age of each person in the photo. Every time the user advances the slide with the arrow the inputs will also advance. The user must fill out the inputs for the rest of the app to work (rest of app not shown here). What I would like is that every time the arrow is clicked the app will check to see if the associated input is empty and if it is the slideshow will not advance and a little message will pop up. I have tried to work out solutions with shinyjs and shinyvalidate and shinyalert but I can’t come up with a solution.

Best Answer:

You can replace the javascript code and slickR code with shinyglide as recommended by ismireshregal. I simplified it but you can prevent the slide from advancing if it doesn’t meet a condition using the next_condition argument. See here for more information: https://juba.github.io/shinyglide/articles/b_conditionals.html.

If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com

r shiny slickr
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: The ‘Access-Control-Allow-Origin’ header contains multiple values ‘*, *’, but only one is allowed. cors error not resolving

02/04/2023

Resolved: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘crm.email’ doesn’t exist (Connection: mysql, SQL: select count(*) as aggregate from `email`

02/04/2023

Resolved: Regex: Curly braces in reverse? Match X characters before a string?

02/04/2023

Comments are closed.

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.