Skip to content

Instantly share code, notes, and snippets.

@gwenaelp
Created August 2, 2018 02:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gwenaelp/57de330c83397692eaa3664cad4c3ed2 to your computer and use it in GitHub Desktop.
Save gwenaelp/57de330c83397692eaa3664cad4c3ed2 to your computer and use it in GitHub Desktop.
export default {
fields: [{
type: 'radios',
label: 'What do you want to do?',
model: 'choice',
values: [
'Check a boolean value',
'Type a string',
],
}, {
type: 'checkbox',
label: 'Boolean value',
model: 'booleanVariable',
visible: (model, field, form) => model.choice === 'Check a boolean value',
}, {
type: 'input',
inputType: 'text',
model: 'stringVariable',
label: 'Type a string',
visible: (model, field, form) => model.choice === 'Type a string',
}],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment