Description Usage Arguments Value Author(s) Examples
Creates a form based on a dataframe. Dataframe classes are cast as element types in the form.
1 |
server_name |
String of the iFormBuilder server name. |
profile_id |
Integer of the iFormBuilder profile ID. |
access_token |
Access token produced by |
name |
String of new page name; coerced to iFormBuilder table name conventions. |
label |
String of the label for the new page. |
data |
A dataframe whose structure will be used to create the new form. |
The page ID of the created form.
Bill DeVoe, William.DeVoe@maine.gov
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # Create a dataframe with some basic form fields
dat = tibble::tibble(survey_id = NA_integer_,
survey_datetime = as.POSIXct(NA, tz = "UTC"),
surveyor = NA_character_,
start_point = NA_real_,
fish_species = NA_integer_,
fish_count = NA_integer_,
end_point = NA_real_,
comment_text = NA_character_,
survey_completed = TRUE)
## Not run:
# Get access_token
access_token <- get_iform_access_token(
server_name = "your_server_name",
client_key_name = "your_client_key_name",
client_secret_name = "your_client_secret_name")
# Create new form from dataframe
new_form <- data2form(
server_name = "your_server_name",
profile_id = "your_profile_id",
access_token = access_token,
name = "new_form_to_create",
label = "New form based on an R dataframe",
data = dat)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.