ona_form_publish: Publish XLSForm

View source: R/ona_form.R

ona_form_publishR Documentation

Publish XLSForm

Description

Publish XLSForm

Usage

ona_form_publish(
  base_url = "https://api.ona.io",
  auth_mode = c("token", "password"),
  xls_file = NULL,
  xls_url = NULL,
  dropbox_xls_url = NULL,
  project_id = NULL,
  public = FALSE
)

Arguments

base_url

ONA URL. Default is https://api.ona.io.

auth_mode

Password or token? Default is token.

xls_file

Path to the XLSForm file.

xls_url

URL to the XLSForm file.

dropbox_xls_url

Dropbox URL to the XLSForm file.

project_id

Project identifier of project to publish XLSForm to. If NULL (default), XLSForm is published to the an account's default project.

public

Logical. Should the form be public? Default to FALSE.

Value

A published form on ONA.

Examples

project_list <- ona_project_list()
if ("test" %in% project_list$name) {
  project_id = project_list$id[project_list$name == "test"]
  ona_project_delete(project_id = project_id)
}
ona_project_register(name = "test")
project_list <- ona_project_list()
project_id = project_list$id[project_list$name == "test"]
ona_form_publish(
  xls_file = system.file(
    "appearance_widgets.xlsx", package = "okapi"
  ),
  project_id = project_id
)


rapidsurveys/odktools documentation built on Jan. 5, 2025, 9:32 a.m.