Skip to content

Support locked FormFields #168

Open
@rgimen3z

Description

@rgimen3z

Looks like BaseFormField was designed to support "locking"/"disabling" an input field:

However, this is not working for me even after extending the json_schema_field_to_field() method to also pass an extra locked=schema.get('locked', False) param to the FormFieldInput in:

return FormFieldInput(
name=name,
title=title,
html_type=input_html_type(schema),
required=required,
initial=schema.get('default'),
description=schema.get('description'),
)

I'm not sure, but I think the problem may lie somewhere in the npm package around the below lines?

required={required}
disabled={locked}

Anyone knows how to fix? Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions