Oh I see. Not sure why I get this error (different error as well)
library(shiny)
library(brio)
ui <- basicPage(
fluidRow(
column(
width = 6,
textInput('a', 'Text A',"a1"),
textInput('b', 'Text B',"b1"),
textInput('c', 'Text A',"c1"),
textInput('d', 'Text B',"d1"),
textInput('e', 'Text A',"e1"),
textInput('f', 'Text B',"f1"),
uiOutput('f1')
),
column(
width = 6,
tags$p(tags$span(id = "valueA", "")),
tags$script(
"$(document).on('shiny:inputchanged', function(event) {
if (event.name === 'a') {
$('#valueA').text(event.value);
}
});
"
)
,tableOutput('show_inputs')
)
)
)
server <- shinyServer(function(input, output, session){
output$f1 <- renderUI({
if(input$a == "a2"){
textInput('z', 'Text B',"z1")
} else {
NULL
}
})
AllInputs <- reactive({
x <- reactiveValuesToList(input)
})
output$show_inputs <- renderTable({
AllInputs()
write_lines(paste(AllInputs(),collapse=","),file = "ShinyInputs.csv",append = TRUE)
})
})
shinyApp(ui = ui, server = server)
Warning: Error in write_lines: unused arguments (file = "ShinyInputs.csv", append = TRUE)