Curently working - mix
See test ( form definition ) implemented
Custom view:
%%form_label{wiki_text_1}%%
%%form_data{wiki_text_1}%%
%%form_label{wiki_text_2}%%
%%form_data{wiki_text_2}%%
%%form_label{valid-this}%%
%%form_data{valid-this}%%
%%form_label{select-from}%%
%%form_data{select-from}%%
%%form_label{pass-field}%%
%%form_data{pass-field}%%
%%form_label{page-wit-path}%%
%%form_data{page-wit-path}%%
%%form_label{hidden-value}%%
%%form_data{hidden-value}%%
%%form_label{wiki_text_1}%%
%%form_data{wiki_text_1}%%
%%form_label{static-field}%%
%%form_data{static-field}%%
[[<]]
[[button edit style="border: 1px solid #AAAAAA; border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px; background-color: #DDDDDD; padding: 8px 18px; text-transform: uppercase; color: #666666; font-weight: bold; text-decoration: none; float: left; margin: 0 5px;"]]
[[button delete style="border: 1px solid #AAAAAA; border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px; background-color: #DDDDDD; padding: 8px 18px; text-transform: uppercase; color: #666666; font-weight: bold; text-decoration: none; float: left; margin: 0 5px;"]]
[[/<]]
====
[[form]]
fields:
wiki_text_1:
label: Wiki 1
type: wiki
wiki_text_2:
label: Wiki 2
type: wiki
before: **Before**
after: --km--
valid-this:
label: Cell phone
type: text
hint: 123-456-789
match: /^[0-9]{3}-[0-9]{3}-[0-9]{3}$/
before: Before
after: mph
valid-this-2:
label: Phone
type: text
hint: '(012) 345-67-89'
default: '(012) 345-67-89'
select-from:
label: Select something
type: select
values:
1: ooo1
2: ooo2
3: ooo3
4: ooo4
5: ooo5
6: ooo6
default: 3
static-field:
type: static
value: "This is a static field with **bold** --strike-- and __underscor__"
pass-field:
label: Password
type: password
default: hidden pass
page-wit-path:
type: pagepath
category: rthgrtyhsjg
default: rthgrtyhsjg:5
hidden-value:
type: hidden
value: This is hidden uneditable value.
checkbox-field:
type: checkbox
label: Are you happy?
default: 1
[[/form]]
Field types test
Info: unsupported fields are shown as 'text' field
'text'
See test ( form definition ) implemented
[[form]]
fields:
name:
label: Your name :
type: text
[[/form]]
'select'
See test ( form definition ) implemented
[[form]]
fields:
chose_1:
label: Chose number
type: select
values:
a: 452
b: 122
c: 934
chose_2:
label: Chose color
type: select
values:
1: Red
2: Blue
3: Green
4: Black
5: White
[[/form]]
'tag'
See test ( form definition )
[[form]]
fields:
your-mood:
label: Your mood
type: tag
values:
_manic: Manic
_happy: Very happy
_calm: Kind of calm
_down: Feeling the blues
_depressed: Give me Rum!
[[/form]]
'parent'
See test ( form definition )
[[form]]
fields:
type-of-issue:
label: Type of issue
type: parent
values:
bug:_start: Problem report
issue:_start: Change request
[[/form]]
'checkbox'
See test ( form definition ) implemented
[[form]]
fields:
check_it:
label: Check me
type: checkbox
[[/form]]
'number'
See test ( form definition )
[[form]]
fields:
happy_number:
label: Your happy number
type: number
[[/form]]
'date'
See test ( form definition )
[[form]]
fields:
bitrh:
label: Birthday
type: date
[[/form]]
'password'
See test ( form definition ) implemented
[[form]]
fields:
user_password:
label: Password
type: password
[[/form]]
'pagepath'
See test ( form definition ) implemented
[[form]]
fields:
geo:
type: pagepath
category: sandbox-126-pagepath-location
label: Location
[[/form]]
'wiki'
See test ( form definition ) implemented
[[form]]
fields:
wiki_text:
label: Place wiki text
type: wiki
[[/form]]
'file'
See test ( form definition )
[[form]]
fields:
cv:
label: Upload CV
type: file
[[/form]]
'image'
See test ( form definition )
[[image %%form_data{photo}%%]]
====
[[form]]
fields:
photo:
label: Your photo
type: image
[[/form]]
'hidden'
See test ( form definition ) implemented
[[form]]
fields:
hidden_val:
type: hidden
[[/form]]
'static'
See test ( form definition ) implemented
[[form]]
fields:
text-1:
label: Text
static_data:
type: static
value: "**bold** --strike-- __underscored__"
text-2:
label: Text
[[/form]]
Field properties
'default'
See test ( form definition ) implemented
[[form]]
fields:
field_with_default:
label: Are you happy ?
type: text
default: "No"
[[/form]]
'join'
See test ( form definition ) implemented
[[form]]
fields:
part_1:
label: Code
type: text
width:10
part_2:
label: -
type: text
join: true
width:10
part_3:
label: -
type: text
join: true
width:10
[[/form]]
'before'
See test ( form definition ) implemented
[[form]]
fields:
name:
label: Your name
type: text
before: Text before
[[/form]]
'after'
See test ( form definition ) implemented
[[form]]
fields:
name:
label: Your name
type: text
after: Text after
[[/form]]
'hint'
See test ( form definition ) half-implemented
[[form]]
fields:
field_with_hint:
label: Are you happy ?
type: text
hint: "Yes"
[[/form]]
'match'
See test ( form definition ) implemented
[[form]]
fields:
name:
label: Your name
type: text
match: ;^([A-Za-z]*)$;
match-error: Field with name is incorrect.
[[/form]]
'required'
See test ( form definition )
[[form]]
fields:
phone:
label: Phone
type: text
required: yes
[[/form]]