Learn R Programming

yonder (version 0.2.0)

fieldset: Group and label multiple inputs

Description

Use fieldset to associate and label inputs. This is good for screen readers and other assistive technologies.

Usage

fieldset(..., legend = NULL)

Arguments

...

Any number of inputs to group or named arguments passed as HTML attributes to the parent element.

legend

A character string specifying the fieldset's legend.

See Also

Other layout functions: column(), flex(), navbar(), responsive, webpage()

Examples

Run this code
# NOT RUN {
### Grouping related inputs

fieldset(
  legend = "Pizza order",
  formGroup(
    "What toppings would you like?",
    div(
      checkbarInput(
        id = "toppings",
        choices = c(
          "Cheese",
          "Black olives",
          "Mushrooms"
        )
      )
    )
  ),
  formGroup(
    "Is this for delivery?",
    checkboxInput(
      id = "deliver",
      choice = "Deliver"
    )
  ),
  buttonInput("order", "Place order") %>%
    background("blue")
)

# }

Run the code above in your browser using DataLab