Create numeric inputs depending on the selection of the user in the selectizeInput. You first need to run both `selectize_count()` and `selectize_names()` to run this.

create_numeric_input(
  selectednames,
  selectedcounts,
  min_user = 1,
  max_user = 10,
  placeholder = 5,
  wanted_step = 0.5,
  id
)

Arguments

selectednames

names recovered through `selectize_names()`

selectedcounts

count recovered through `selectize_count()`

min_user

minimum value of the numericInputs

max_user

maximum value of the numericInputs

placeholder

placeholder value in the numericInput

wanted_step

step of the value in the numericInput

id

id to add when we want to use the functions more than one time in the app

Value

return a vector containing the numbers the user selected from 1:10

Author

Marie Bellier, Massimo Finini, Meri Likoska, Vania Rodrigues Telo Ramos, Xavier Renger

Examples


#let's say the user selected those anime in the app
selectize <- c("Naruto", "Death Note", "One Piece")

#we will use both selectize_names and selectize_count
names <- selectize_names(selectize)
count <- selectize_count(selectize)

#we can then create the inputs
create_numeric_input(names, count, id = "example")
#> <div class="form-group shiny-input-container">
#>   <label class="control-label" id="example_1-label" for="example_1">Naruto Score</label>
#>   <input id="example_1" type="number" class="form-control" value="5" min="1" max="10" step="0.5"/>
#> </div>
#> <div class="form-group shiny-input-container">
#>   <label class="control-label" id="example_2-label" for="example_2">Death Note Score</label>
#>   <input id="example_2" type="number" class="form-control" value="5" min="1" max="10" step="0.5"/>
#> </div>
#> <div class="form-group shiny-input-container">
#>   <label class="control-label" id="example_3-label" for="example_3">One Piece Score</label>
#>   <input id="example_3" type="number" class="form-control" value="5" min="1" max="10" step="0.5"/>
#> </div>