Liking cljdoc? Tell your friends :D

hatti.ona.forms


audio?cljs

(audio? field)
source

calculate?cljs

(calculate? field)

Checks whether a field is a calculate field

Checks whether a field is a calculate field
sourceraw docstring

categorical?cljs

(categorical? field)

Checks whether a field is a category field (select one or multiple)

Checks whether a field is a category field (select one or multiple)
sourceraw docstring

currency-regexcljs

source

default-geofieldcljs

(default-geofield flat-form)

From a list of geofields, get the default one to map. Implementation: pick first geoshape if any, else pick first geofield.

From a list of geofields, get the default one to map.
Implementation: pick first geoshape if any, else pick first geofield.
sourceraw docstring

default-langcljs

(default-lang languages)

Get default language (English or alphabetical first) from within a list.

Get default language (English or alphabetical first) from within a list.
sourceraw docstring

english?cljs

(english? language)
source

extra-submission-detailscljs

source

field-name-in-set?cljs

(field-name-in-set? names field)

Helper function: is the :name of a field among a set of names

Helper function: is the :name of a field among a set of names
sourceraw docstring

field-type-in-set?cljs

(field-type-in-set? types field)

Helper function: is the :type of a field among a set of types

Helper function: is the :type of a field among a set of types
sourceraw docstring

flatten-formcljs

(flatten-form {:keys [children] :as form} & {:keys [flatten-repeats?]})

Input: map derived from form.json. Output: a flattened vector; each element is a field; a field is a {:name .. :label .. :type ..} map. By default, REPEAT BLOCKS ARE NOT FLATTENED, repeat blocks represent subforms, which need special handling in most cases. :flatten-repeats? overrides default behavior, also flattens repeats.

Input: map derived from form.json. Output: a flattened vector;
each element is a field; a field is a {:name .. :label .. :type ..} map.
By default, REPEAT BLOCKS ARE NOT FLATTENED, repeat blocks represent
subforms, which need special handling in most cases.
:flatten-repeats? overrides default behavior, also flattens repeats.
sourceraw docstring

format-answercljs

(format-answer field
               answer
               &
               {:keys [language compact? label field-key media record-modal?
                       media-count total-media]
                :or {field-key :name record-modal? false}})

String representation for a particular field datapoint (answer). re-formatting depends on field type, eg. name->label substitution. Optional: compact? should be true if a short string needs to be returned.

String representation for a particular field datapoint (answer).
re-formatting depends on field type, eg. name->label substitution.
Optional: compact? should be true if a short string needs to be returned.
sourceraw docstring

geofield?cljs

(geofield? field)
source

geofieldscljs

(geofields flat-form)

Get just the geofields from the form.

Get just the geofields from the form.
sourceraw docstring

geopoint?cljs

(geopoint? field)
source

geoshape?cljs

(geoshape? field)
source

geotrace?cljs

(geotrace? field)
source

get-column-classcljs

(get-column-class field)

Assign class according to field type category, e.g. integer & decimals are both in the numeric category

Assign class according to field type category, e.g. integer & decimals are
both in the numeric category
sourceraw docstring

get-iconcljs

(get-icon field)

Get the icon relevant to the given field (depending on its type).

Get the icon relevant to the given field (depending on its type).
sourceraw docstring

get-labelcljs

(get-label {:keys [label name]} & [language])

Gets the label object out of a map with key :label (eg. a field). If multiple languages, and none specified, picks out alphabetically first.

Gets the label object out of a map with key :label (eg. a field).
If multiple languages, and none specified, picks out alphabetically first.
sourceraw docstring

get-languagescljs

(get-languages form)

Get the languages for a given form.

Get the languages for a given form.
sourceraw docstring

group?cljs

(group? field)

Checks whether a field in a form (ie, a field) is a group field

Checks whether a field in a form (ie, a field) is a group field
sourceraw docstring

has-data?cljs

(has-data? field)

Returns false for fields such as note, group, etc. which don't have data

Returns false for fields such as note, group, etc. which don't have data
sourceraw docstring

id-fieldcljs

source

image?cljs

(image? field)
source

infor-icon-componentcljs

(infor-icon-component answer & {:keys [media-count total-media help-url]})

Returns an infor icon with a tooltip message

Returns an infor icon with a tooltip message
sourceraw docstring

last_editedcljs

source

media-files-upload-error-componentcljs

(media-files-upload-error-component answer
                                    &
                                    {:keys [help-url error-message
                                            record-modal?]})

Displays tip question and tooltip msg for failed media files uploads

Displays tip question and tooltip msg for failed media files uploads
sourceraw docstring

media_received_fieldcljs

source

meta-fieldscljs

(meta-fields flat-form
             &
             {:keys [relabel? with-submission-details?] :or {relabel? true}})

Get just the meta fields out of the form. Options to re-label meta fields, or include submission time in meta list.

Get just the meta fields out of the form.
Options to re-label meta fields, or include submission time in meta list.
sourceraw docstring

meta?cljs

(meta? field)
source

multilingual?cljs

(multilingual? form)

Does this form contain labels in multiple languages?

Does this form contain labels in multiple languages?
sourceraw docstring

name-label-mapcljs

(name-label-map {:keys [children name label] :as child}
                prefix
                acc
                flatten-repeats?)
source

newline-regexcljs

source

no-answercljs

source

non-meta-fieldscljs

(non-meta-fields flat-form)

Get just the fields in this form that are not meta fields.

Get just the fields in this form that are not meta fields.
sourceraw docstring

note?cljs

(note? field)

Checks whether a field in a form (a field) is a group field

Checks whether a field in a form (a field) is a group field
sourceraw docstring

numeric?cljs

(numeric? field)

Checks whether a field is a numeric field

Checks whether a field is a numeric field
sourceraw docstring

osm?cljs

(osm? field)
source

relabel-meta-fieldcljs

(relabel-meta-field {:keys [label name type] :as field})

Try and produce a label for meta field if non-existent.

Try and produce a label for meta field if non-existent.
sourceraw docstring

repeat?cljs

(repeat? field)

Checks whether a field in a form (ie, a field) is a repeat field

Checks whether a field in a form (ie, a field) is a repeat field
sourceraw docstring

review-comment-fieldcljs

source

review-status-fieldcljs

source

select-all?cljs

(select-all? field)

Checks whether a field is a select multiple (select all that apply) field

Checks whether a field is a select multiple (select all that apply) field
sourceraw docstring

select-one?cljs

(select-one? field)

Checks whether a field is a select one field

Checks whether a field is a select one field
sourceraw docstring

submission-time-fieldcljs

source

submitted-by-fieldcljs

source

text?cljs

(text? field)

Checks whether a field is a text / string field.

Checks whether a field is a text / string field.
sourceraw docstring

time-based?cljs

(time-based? field)

Checks whether a field is a date or a time field

Checks whether a field is a date or a time field
sourceraw docstring

uses-search-expression?cljs

(uses-search-expression? appearance-value)

Checks if the appearance-value has the search expression

Checks if the appearance-value has the search expression
sourceraw docstring

video?cljs

(video? field)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close