Skip to contents

Number Input Form Group

Usage

inp_number(from = 0, to = 100, step = 1, label = NULL, width = 4, ...)

Arguments

from

a number

to

a number

step

the step size for the number input

label

label for the form input - this will default to display the name of the variable

width

the form-group's width in bootstrap grid units

...

additional arguments passed to the form group parser

Value

An object of class "appifyr_input" and "appifyr_number_input"

Examples

inp_number()
#> $fg
#> [1] "number"
#> 
#> $label
#> NULL
#> 
#> $width
#> [1] 4
#> 
#> $opts
#> $opts$from
#> [1] 0
#> 
#> $opts$to
#> [1] 100
#> 
#> $opts$step
#> [1] 1
#> 
#> 
#> $dots
#> list()
#> 
#> attr(,"class")
#> [1] "appifyr_input"        "appifyr_number_input"
inp_number(from = 0, to = 1e9)
#> $fg
#> [1] "number"
#> 
#> $label
#> NULL
#> 
#> $width
#> [1] 4
#> 
#> $opts
#> $opts$from
#> [1] 0
#> 
#> $opts$to
#> [1] 1e+09
#> 
#> $opts$step
#> [1] 1
#> 
#> 
#> $dots
#> list()
#> 
#> attr(,"class")
#> [1] "appifyr_input"        "appifyr_number_input"
inp_number(from = 1, to = 7, label = "This Is A Survey")
#> $fg
#> [1] "number"
#> 
#> $label
#> [1] "This Is A Survey"
#> 
#> $width
#> [1] 4
#> 
#> $opts
#> $opts$from
#> [1] 1
#> 
#> $opts$to
#> [1] 7
#> 
#> $opts$step
#> [1] 1
#> 
#> 
#> $dots
#> list()
#> 
#> attr(,"class")
#> [1] "appifyr_input"        "appifyr_number_input"
inp_number(from = 0, to = 1, step = 0.1, label = "Probability")
#> $fg
#> [1] "number"
#> 
#> $label
#> [1] "Probability"
#> 
#> $width
#> [1] 4
#> 
#> $opts
#> $opts$from
#> [1] 0
#> 
#> $opts$to
#> [1] 1
#> 
#> $opts$step
#> [1] 0.1
#> 
#> 
#> $dots
#> list()
#> 
#> attr(,"class")
#> [1] "appifyr_input"        "appifyr_number_input"