I am trying to create a downloadButton() in UI and downloadHandler() in server. The goal is to prevent the download if certain conditions are not met, for example if the selectInput() is blank or no option selected. As an example here is the code:
I want to make the downloadButton only works if (input$select != ""), otherwise it should give like a pop-up message or an error like mentioned in Message popup. I have tried different things with if else() options but it did not work. Could anybody help me?
place a uiOutput, and when your define the renderUI function, you can programattically determine whether to place a downloadbutton there or just a regular button that triggers a pop up message.
Could you give an example of it? I don't understand what you mean with downloadButton and regular button. I don't actually really want to have 2 buttons . Thank you