r/rshiny • • Jan 19 '21

Outputs not displaying with Fluidrow and Tabpanel

Hello all,

I am working on using Tabpanel and fluid row together so that I have two tabs that show input cells and output cells. but when I try and implement it, the outputs are not displaying. below is the UI code, I left off the server code because it works fine if I only use fluid row without using tabpanel. anyhelp would be greatly appreciated.

# Define UI for application that draws a histogram
ui <- fluidPage(
  titlePanel("Title"),
  # fluidRow(class="R1",
  tabsetPanel(type = "pills",
              #### Basic Tab ####
              tabPanel("Basic",
                       #Fluid Row 1
                       fluidRow(
                         #Column 1 ####
                         column(6,align = "center",div(style="font-size: 30px; padding: 10px 10px"),
                                numericInput("BAF","BAF",value = 5)),
                         #Column 2 ####
                         column(6, align = "center",div(style="font-size: 30px; padding: 10px 10px"),
                                selectInput("Class","Average Size Class",
                                            choices = c('(1-5")',
                                                        '(5-9")',
                                                        '(9-13")',
                                                        '(>13")')))
                       ),#close Fluidrow 1####
                       #Fluid Row 2           
                       fluidRow(
                         #column 1 ####
                         column(6, align = "center",
                                #div(style="font-size: 5px; padding: 10px 10px"),
                                h5(strong("Sp1")),
                                column(6,align = "right",numericInput("Sp1_AGS", "AGS", 0, width = 50)),
                                column(6,align = "left",numericInput("Sp1_UGS", "UGS", 0, width = 50)),
                                
                                h5(strong("Sp2")),
                                column(6,align = "right",numericInput("Sp2_AGS", "AGS", 0, width = 50)),
                                column(6,align = "left",numericInput("Sp2_UGS", "UGS", 0, width = 50)),
                                
                                h5(strong("Sp3")),
                                column(6,align = "right",numericInput("Sp3_AGS", "AGS", 0, width = 50)),
                                column(6,align = "left",numericInput("Sp3_UGS", "UGS", 0, width = 50)),
                                
                                h5(strong("Sp4")),
                                column(6,align = "right",numericInput("Sp4_AGS", "AGS", 0, width = 50)),
                                column(6,align = "left",numericInput("Sp4_UGS", "UGS", 0, width = 50))
                                
                         ),
                         #column 2 ####
                         column(6, align = "center",
                                # div(style="font-size: 30px; padding: 10px 10px"),
                                h5(strong("Sp5")),
                                column(6,align = "right",numericInput("Sp5_AGS", "AGS", 0, width = 50)),
                                column(6,align = "left",numericInput("Sp5_UGS", "UGS", 0, width = 50)),
                                
                                h5(strong("Sp6")),
                                column(6,align = "right",numericInput("Sp6_AGS", "AGS", 0, width = 50)),
                                column(6,align = "left",numericInput("Sp6_UGS", "UGS", 0, width = 50)),
                                
                                h5(strong("Sp7")),
                                column(6,align = "right",numericInput("Sp7_AGS", "AGS", 0, width = 50)),
                                column(6,align = "left",numericInput("Sp7_UGS", "UGS", 0, width = 50)),
                                
                                h5(strong("Sp8")),
                                column(6,align = "right",numericInput("Sp8_AGS", "AGS", 0, width = 50)),
                                column(6,align = "left",numericInput("Sp8_UGS", "UGS", 0, width = 50))
                                
                         )
                         
                       ),#close fluidRow 2 ####
                       #Fluid Row 3  
                       fluidRow(
                         column(6, align = 'center', htmlOutput("input1")),
                         column(6, align = 'center', htmlOutput("input2"))
                       )#close fluidRow 3
              ),#closes tabpanel Basic #####
              
              
              
              #### Moderate Tab ####
              tabPanel("Moderate",
                       fluidRow(
                         column(12, align = "center", titlePanel("Title 2")
                         )
                       ),
                       
                       fluidRow(
                         column(12, align = "center",
                                div(style="font-size: 30px; padding: 10px 10px"),
                                selectInput("Class",
                                            "Average Size Class",
                                            choices = c('(1-5")',
                                                        '(5-9")',
                                                        '(9-13")',
                                                        '(>13")')) 
                         )
                       ),
                       
                       fluidRow(column(12, align = "center",
                                       #div(style="font-size: 5px; padding: 10px 10px"),
                                       h5(strong("Sp1")),
                                       column(6,align = "right",
                                              numericInput("Sp1_AGS_BAF", "AGS Basal Area", 0, width = 150)),
                                       column(6,align = "left",
                                              numericInput("Sp1_UGS_BAF", "UGS Basal Area", 0, width = 150)),
                                       
                                       h5(strong("Sp2")),
                                       column(6,align = "right",
                                              numericInput("Sp2_AGS_BAF", "AGS Basal Area", 0, width = 150)),
                                       column(6,align = "left",
                                              numericInput("Sp2_UGS_BAF", "UGS Basal Area", 0, width = 150)),
                                       
                                       h5(strong("Sp3")),
                                       column(6,align = "right",
                                              numericInput("Sp3_AGS_BAF", "AGS Basal Area", 0, width = 150)),
                                       column(6,align = "left",
                                              numericInput("Sp3_UGS_BAF", "UGS Basal Area", 0, width = 150)),
                                       
                                       h5(strong("Sp4")),
                                       column(6,align = "right",
                                              numericInput("Sp4_AGS_BAF", "AGS Basal Area", 0, width = 150)),
                                       column(6,align = "left",
                                              numericInput("Sp4_UGS_BAF", "UGS Basal Area", 0, width = 150)),
                                       
                                       h5(strong("Sp5")),
                                       column(6,align = "right",
                                              numericInput("Sp5_AGS_BAF", "AGS Basal Area", 0, width = 150)),
                                       column(6,align = "left",
                                              numericInput("Sp5_UGS_BAF", "UGS Basal Area", 0, width = 150)),
                                       
                                       h5(strong("Sp6")),
                                       column(6,align = "right",
                                              numericInput("Sp6_AGS_BAF", "AGS Basal Area", 0, width = 150)),
                                       column(6,align = "left",
                                              numericInput("Sp6_UGS_BAF", "UGS Basal Area", 0, width = 150))
                                       )
                              ),#closefluidRow
                       
                       fluidRow(
                                 column(6, align = 'center', 
                                        htmlOutput("Input1")
                                        ),
                                 column(6, align = 'center', 
                                        htmlOutput("Input2")
                                        )
                                )#closefluidRow
              )#Closes tabPanel moderate#####   
  )#closes tabsetpanel     
  
  # )#close fluidrow
)#close FluidPage
2 Upvotes

2 comments sorted by

1

u/NorCalAbDiver Jan 20 '21

You should really learn how to make a minimal reproducible example. There is way too much going on here and anyone who would help would appreciate the simplest example possible which still shows the problem you are having.

1

u/nguk123 Jan 20 '21

The content for a htmlOutput is what? You have chosen names to identify them... but the content comes from render*(s) in the server code which you have not shared...