form_bootstrap: Bootstrap form elements

View source: R/form-bootstrap.R

form_bootstrapR Documentation

Bootstrap form elements

Description

Bootstrap form elements

Usage

form_bootstrap(action, ..., method = "post", `accept-charset` = "utf-8")

label_bs(name, label)

input_bs(
  name,
  label = capitalise(name),
  type = "text",
  help = NULL,
  required = FALSE,
  ...
)

textarea_bs(
  name,
  label = capitalise(name),
  rows = 3,
  help = NULL,
  required = FALSE,
  ...
)

radio_bs(name, choices, label = capitalise(name), ...)

checkbox_bs(name, choices, label = capitalise(name), ...)

select_bs(
  name,
  choices,
  label = capitalise(name),
  selected = NULL,
  multiple = FALSE,
  ...
)

submit_bs(label = "Submit", class = "btn btn-default", ...)

Arguments

action

action link for the form

...

passed to the corresponding tags function

method

post or get

accept-charset

Unicode by default

name

name of the element, used to process form data in php

label

label of the element, visible on the page; by default, a capitalised version of the name

type

of input. Is checked against valid HTML5 input types

help

help text, placed under the element

required

boolean, wether the input is required or not

rows

number of rows shown by default in multiline text areas

choices

a vector of possible values; if named, the content is the value tag and the names is displayed

selected

boolean, allow multiple choices in 'select_bs()'

class

class of the submit button

See Also

tags


jiho/yssr documentation built on Feb. 4, 2023, 7:48 p.m.