Skip to content

Commit

Permalink
Add hidden field.
Browse files Browse the repository at this point in the history
  • Loading branch information
robgietema committed Sep 12, 2024
1 parent de1b655 commit 8c6e063
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/packages/volto-form-block/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ const applyConfig = (config) => {
'label_datetime_field',
'File Upload',
'label_email',
'hidden',
],
additionalFactory: [{ value: 'hidden', label: 'Hidden' }],
defaultSender: '[email protected]',
defaultSenderName: 'Plone',
additionalFields: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class Edit extends Component {
render() {
const FormSchema = config.blocks.blocksConfig.schemaForm.blockSchema;
const filterFactory = config.blocks.blocksConfig.schemaForm.filterFactory;
const additionalFactory =
config.blocks.blocksConfig.schemaForm.additionalFactory;
const schema = FormSchema(this.props);
const { data } = this.props;

Expand Down Expand Up @@ -60,6 +62,7 @@ class Edit extends Component {
widget: 'schema',
default: defaultEmptyData,
filterFactory,
additionalFactory,
},
},
required: [],
Expand Down

0 comments on commit 8c6e063

Please sign in to comment.