Set widgets in the same line inside a shiny app


#1

I have a shiny app which produces a a wellpanel with some widgets.

#ui.r
navbarPage(
  "Application",
  tabPanel("General",
           sidebarLayout(

             sidebarPanel(

             ),

             mainPanel(
               wellPanel(
                 h4("Format"),
                 fluidRow( # Width = sum of component columns 
                   tags$style(type="text/css",
                              ".shiny-output-error { visibility: hidden; }",
                              ".shiny-output-error:before { visibility: hidden; }"
                   ),
                   column(3,
                          h5("Booklet ID"),
                          div(style="display: inline-block;vertical-align:top; width: 150px;",uiOutput("num3"))


                   ),
                   column(
                     3,h5("Data"),
                     div(style="display: inline-block;vertical-align:top; width: 150px;",uiOutput("num4"))


                   ),
                   column(3,
                          uiOutput("c1"),
                          div(style="display: inline-block;vertical-align:top; width: 150px;",uiOutput("num8")),
                          uiOutput("help1")),

                   column(
                     3,
                     uiOutput("c2"),
                     div(style="display: inline-block;vertical-align:top; width: 150px;",uiOutput("num10")),
                     uiOutput("help3")


                   )
                 ),
                 column(width = 12, fixedRow( # Width = sum of component columns fluidRow
                   tags$style(type="text/css",
                              ".shiny-output-error { visibility: hidden; }",
                              ".shiny-output-error:before { visibility: hidden; }"
                   ),
                   column(
                     3,
                     div(style="display: inline-block;vertical-align:top; width: 150px;",uiOutput("num5"))


                   ),
                   column(
                     3,
                     div(style="display: inline-block;vertical-align:top; width: 150px;",uiOutput("num7"))


                   ),
                   column(
                     3,
                     div(style="display: inline-block;vertical-align:top; width: 150px;",uiOutput("num9")),
                     uiOutput("help2")


                   ),
                   column(
                     3,
                     div(style="display: inline-block;vertical-align:top; width: 150px;",uiOutput("num11")),
                     uiOutput("help4")


                   )
                 )))



             )
           )

  )
)
#server.r
library(shiny)

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

  output$num3<-renderUI({
    textInput("nm3", 
              h6("Column"), 
              value = 1)
  })
  output$num4<-renderUI({
    textInput("nm4", 
              h6("First Column"), 
              value = as.numeric(input$nm3)+input$nm5)
  })

  output$num5<-renderUI({
    numericInput("nm5", 
                 h6("Length"), 
                 value = 2)
  })

  output$num7<-renderUI({
    numericInput("nm7", 
                 h6("Length Response"), 
                 value = 1)
  })

  output$c1<-renderUI({
    checkboxInput("ch1", 
                  h5("Person ID"), value = FALSE)
  })

  output$num8<-renderUI({
    if(input$ch1==T){
      textInput("nm8", 
                h6("Column"), 
                value = 1)
    }
    else{
      output$help1<-renderUI({
        helpText("Click Person ID")
      }) 
    }

  })
  output$num9<-renderUI({
    if(input$ch1==T){
      numericInput("nm9", 
                   h6("Length"), 
                   value = 1)
    }
    else{
      output$help2<-renderUI({
        helpText("Click Person ID")
      }) 
    }
  })

  output$c2<-renderUI({
    checkboxInput("ch2", 
                  h5("Covariates"), value = FALSE)
  }) 


  output$num10<-renderUI({
    if(input$ch2==T){
      textInput("nm10", 
                h6("Column"), 
                value = 1)
    }
    else{
      output$help3<-renderUI({
        helpText("Click Covariates")
      }) 
    }
  })
  output$num11<-renderUI({
    if(input$ch2==T){
      numericInput("nm11", 
                   h6("Length"), 
                   value = 1)
    }
    else{
      output$help4<-renderUI({
        helpText("Click Covariates")
      }) 
    }
  })


}

I want to achieve to have everything in the same line in my well panel. The problem is that as you will see I can partialy achieve this. I achieved it in the third line but I cannot achieve it in the 2nd.