I wish to display a dialog saying "No Barcode Scanned" when user clicks Save Data button when its textbox of Barcode is empty (i.e input$Barcode). But below does not display that dialog. Can anyone help? Thanks.
observeEvent(input$save_data,{
req(input$Barcode)
if (is.null(input$Barcode)) {
showModal(modalDialog(
title = "No Barcode Scanned",
"Please scan a barcode in the textbox.",
easyClose = TRUE
))
jqui_draggable(selector = '.modal-content')
} else {
### blah blah do something
}