Created
September 15, 2022 18:05
-
-
Save hasanmisbah/2609de808d35ffa538d0296c218d135a to your computer and use it in GitHub Desktop.
Form Builder Schema (Draft). Build Form Based on schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const schema = { | |
name: { | |
type: 'text', | |
label: 'Name', | |
id: 'Name', | |
placeholder: '', | |
value: '' | |
}, | |
sex: { | |
type: 'radio', | |
label: 'sex', | |
options: [ | |
{ | |
label: 'Male', | |
value: 'male' | |
}, | |
{ | |
label: 'Female', | |
value: 'female' | |
}, | |
{ | |
label: 'Other', | |
value: 'other' | |
} | |
], | |
default: 'male', | |
}, | |
email: { | |
type: 'email', | |
label: 'Email', | |
id: 'email', | |
placeholder: 'Email', | |
value: '' | |
}, | |
city: { | |
type: 'select', | |
label: 'City', | |
id: 'City', | |
placeholder: 'City', | |
options: [ | |
{ | |
label: 'Sylhet', | |
value: 'sylhet' | |
}, | |
{ | |
label: 'Dhaka', | |
value: 'Dhaka' | |
} | |
], | |
}, | |
phone: { | |
type: 'tel', | |
label: 'Phone', | |
id: 'phone', | |
placeholder: 'phone', | |
}, | |
profile_photo: { | |
type: 'image', | |
label: 'Profile Photo', | |
id: 'profile_photo', | |
placeholder: 'Profile Photo', | |
showPreview: true | |
}, | |
intro_video: { | |
type: 'video', | |
label: 'Intro video', | |
id: 'intro_video', | |
placeholder: 'Intro video', | |
showPreview: true | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment