@@ -49,65 +49,67 @@ const options = [
4949]
5050
5151const schema = reactive(
52- [
53- {
54- $el: 'h2',
55- children: ['Register ', '$email'],
56- },
57- {
58- $el: 'h3',
59- children: 'Header Text H3',
60- },
61- {
62- $formkit: 'primeInputText',
63- name: 'email',
64- label: 'Email',
65- help: 'This will be used for your account.',
66- validation: 'required|email',
67- },
68- {
69- $formkit: 'primeTextarea',
70- name: 'myText',
71- label: 'Text',
72- validation: '',
73- rows: '3',
74- },
75- {
76- $formkit: 'primeEditor',
77- name: 'myEditor',
78- label: 'Editor',
79- style: 'height: 160px;',
80- },
81- {
82- $formkit: 'primeInputText',
83- name: 'password',
84- label: 'Password',
85- help: 'Enter your new password.',
86- validation: 'required|length:5,16',
87- },
88- {
89- $formkit: 'primeInputText',
90- name: 'password_confirm',
91- label: 'Confirm password',
92- help: 'Enter your new password again.',
93- validation: 'required|confirm',
94- validationLabel: 'password confirmation',
95- },
96- {
97- $formkit: 'primeCheckbox',
98- name: 'eu_citizen',
99- id: 'eu',
100- label: 'Are you a european citizen?',
101- },
102- {
103- $formkit: 'primeDropdown',
104- if: '$get(eu).value', // 👀 Oooo, conditionals!
105- name: 'cookie_notice',
106- label: 'Cookie notice frequency',
107- options,
108- help: 'How often should we display a cookie notice?',
109- },
110- ],
52+ [
53+ {
54+ $el: 'h2',
55+ children: ['Register ', '$email'],
56+ },
57+ {
58+ $el: 'h3',
59+ children: 'Header Text H3',
60+ },
61+ {
62+ $formkit: 'primeInputText',
63+ name: 'email',
64+ label: 'Email',
65+ help: 'This will be used for your account.',
66+ validation: 'required|email',
67+ },
68+ {
69+ $formkit: 'primeTextarea',
70+ name: 'myText',
71+ label: 'Text',
72+ validation: '',
73+ rows: '3',
74+ },
75+ {
76+ $formkit: 'primeEditor',
77+ name: 'myEditor',
78+ label: 'Editor',
79+ style: 'height: 160px;',
80+ },
81+ {
82+ $formkit: 'primeInputText',
83+ name: 'password',
84+ label: 'Password',
85+ help: 'Enter your new password.',
86+ validation: 'required|length:5,16',
87+ },
88+ {
89+ $formkit: 'primeInputText',
90+ name: 'password_confirm',
91+ label: 'Confirm password',
92+ help: 'Enter your new password again.',
93+ validation: 'required|confirm',
94+ validationLabel: 'password confirmation',
95+ },
96+ {
97+ $formkit: 'primeCheckbox',
98+ name: 'eu_citizen',
99+ id: 'eu',
100+ label: 'Are you a european citizen?',
101+ },
102+ {
103+ $formkit: 'primeDropdown',
104+ if: '$get(eu).value', // 👀 Oooo, conditionals!
105+ name: 'cookie_notice',
106+ label: 'Cookie notice frequency',
107+ optionLabel: 'label',
108+ optionValue: 'value',
109+ options,
110+ help: 'How often should we display a cookie notice?',
111+ },
112+ ],
111113)
112114
113115const data = ref({ email: '[email protected] ' })
0 commit comments