-
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
Question: How to implement a lastButton() that goes to a final screen, 1 screen prior #50
Comments
Hi, did you try to add the |
Thanks for the reply @juba - and for your package! I assume you mean on the controls, putting in the div? I think I tried this but will give it another shot and update. |
Ok so I've amended the code and tried but still not seeing any Submit Survey button. Final question
The HTML when I look on my browser for the last slide is as follows:
|
And what if you replace: div(
`data-glide-el` = "controls",
tags$a(
class = "btn btn-primary last-screen",
`data-glide-dir` = sprintf("=%d", length(all_screens) - 1), # Point to thank you screen
"Submit Survey"
)
) with something like: shinyglide::lastButton(
class = "btn btn-primary",
`data-glide-dir` = sprintf("=%d", length(all_screens) - 1),
"Submit survey"
) Not sure at all it will work unfortunately, it's been a while since I last used this package... |
I am building a survey app that would require a submit survey button on the final screen but to maintain continuity, have built a thank you/submission screen for a user to create an account or view historic responses.
I'm currently attempting to apply a "last-screen" class to the n-1 screen (final question of the survey) that says 'Submit Survey' and when a user clicks, their responses our submitted to the back end and they are progressed to the submission success screen. I can't for the life of me seem to get the final survey screen to show a Submit Survey button - it just keeps the normal "Next" button.
Screen creation for each survey question:
question_screen <- shinyglide::screen( div( id = ns(paste0('slide_', id)), header, input ) )
Loop to create all screen programmatically
screen_ui <- apply(survey_questions, 1, function(row) { create_question_ui(row, ns, max_key) })
Create thank you screen
Combine Screens
all_screens <- c(screen_ui, list(thank_you_ui))
Custom controls
Create glide within fullPage container
The text was updated successfully, but these errors were encountered: