My submit button on the UI code appears to be on top of the sidebar panel

Good day my fellow R bloggers, after running my ui code, my submit button appears to be ontop of the sidebar panel instead of being below it. how do I get this resolved?

#UI CODE

ui <- shinyUI(fluidPage(
headerPanel(title="STATISTICAL PROCESS CONTROL"),
sidebarLayout(
sidebarPanel(
tags$h2("Input:"),
textInput(inputId="txt1",label= "sql script:")

), # sidebarPanel

actionButton("submitbutton", "Submit", 
             class = "btn btn-primary")

),
mainPanel(
tabsetPanel(type = "tab",
tabPanel("PLOT_CELL",plotOutput("plot_cell")),
tabPanel("CELL_STAT",tableOutput("CELL_STAT")),
tabPanel("COUNT_MEASURES",tableOutput("COUNT_MEASURES")),
tabPanel("STAT_MEASURES",tableOutput("STAT_MEASURES"))

) # mainPanel

), # Navbar 1, tabPanel

) # navbarPage
) # fluidPage

library(shiny)

ui <- fluidPage(
  headerPanel(title="STATISTICAL PROCESS CONTROL"),
  sidebarLayout(
    sidebarPanel(
      tags$h2("Input:"),
      textInput(inputId="txt1",label= "sql script:"),
      actionButton("submitbutton", "Submit", 
                   class = "btn btn-primary")
    ) # sidebarPanel
  ,  mainPanel(
    tabsetPanel(type = "tab",
                tabPanel("PLOT_CELL",plotOutput("plot_cell")),
                tabPanel("CELL_STAT",tableOutput("CELL_STAT")),
                tabPanel("COUNT_MEASURES",tableOutput("COUNT_MEASURES")),
                tabPanel("STAT_MEASURES",tableOutput("STAT_MEASURES"))  
    ) # tabsetPanel
  ) # mainPanel
  )#sidebarLayout
) # fluidPage

server <- function(input, output, session) {
  
}

shinyApp(ui, server)

Thank you a lot. This worked perfectly well, but the submit button is not functional as outputs changes automatically when a new input is entered without the influence of the submit button.
How do I resolve this please?

you dont make server code reactive on the various inputs directly but rather on the submit button event.
Its worth reading all the shiny tutorials so that you have some familiarity with observe(), observeEvent(), reactive(), eventReactive(), isolate() etc.

ok, I will do just that, but if you have an article that can expose me to these familiarity, this I will really appreciate.

https://shiny.rstudio.com/articles/isolation.html

wow thank you sir, I really appreciate

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.