Template:VisualDataForm

From Wikienterprise
Jump to navigation Jump to search
{{VisualDataForm
|schemas = 
|title = 
|action = 
|view = 
|layout = 
|callback = 
|edit-page = 
|preload = 
|return-page = 
|popup-size = 
|css-class = 
|pagename-formula = 
|edit-freetext = 
|edit-categories = 
|edit-content-model = 
|target-slot = 
|default-categories = 
|default-content-model = 
|layout-align = 
|popup-help = 
|submit-button-text = 
|validate-button-text = 
}}

Attention! VisualEditor won't handle the template correctly if it contains new lines!!

A parser function to enclose one or more schemas in a form

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
schemasschemas

one more schema name, comma separated

Default
Example
Stringrequired
titletitle

title of the form (or the panel if a form containing multiple schemas)

Default
Example
Stringrequired
actionaction

form action, can be create or edit

Default
create
Example
Stringrequired
viewview

display mode of the form, can be inline or popup

Default
inline
Example
Stringrequired
layoutlayout

form layout with multiple schemas, can be tabs or booklet

Default
tabs
Example
Stringrequired
callbackcallback

(javascript) callback function called on submit

Default
Example
Stringoptional
edit-pageedit-page

title of the page holding the data to edit (with edit action)

Default
Example
Stringoptional
preloadpreload

page name with preload json data

Default
Example
Stringoptional
return-pagereturn-page

return page

Default
Example
Stringoptional
popup-sizepopup-size

popup-size, possible values: small, medium, large, larger full

Default
medium
Example
Stringoptional
css-classcss-class

css-class to be attached to the form

Default
Example
Stringoptional
pagename-formulapagename-formula

formula used to create a new article through the form with the entered data, in the form contacts/<first_name> <last_name>, where <first_name> and <last_name> are the property names of the related schema

Default
Example
Stringoptional
edit-freetextedit-freetext

whether the form allows to edit freetext

Default
0
Example
Booleanoptional
edit-categoriesedit-categories

whether the form allows to edit categories

Default
0
Example
Booleanoptional
edit-content-modeledit-content-model

whether the form allows to edit the content model

Default
0
Example
Booleanoptional
target-slottarget-slot

target slot for article metadata, could be jsondata or main

Default
jsondata
Example
Stringoptional
default-categoriesdefault-categories

default categories (comma separated)

Default
Example
Stringoptional
default-content-modeldefault-content-model

default content model

Default
wikitext
Example
Stringoptional
layout-alignlayout-align

default align for the OO.ui.FieldLayout, possible values are left right top inline

Default
top
Example
Stringoptional
popup-helppopup-help

corresponds to helpinline set to false in the OO.ui.FieldLayout

Default
0
Example
Booleanoptional
submit-button-textsubmit-button-text

text of the submit button

Default
submit
Example
Stringoptional
validate-button-textvalidate-button-text

text of the validate button

Default
validate
Example
Stringoptional