Skip to content
This repository was archived by the owner on Jun 7, 2026. It is now read-only.
This repository was archived by the owner on Jun 7, 2026. It is now read-only.

Support locked FormFields #168

Open

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!

Activity

  1. samuelcolvin commented on Feb 9, 2024

    @samuelcolvin
    Member

    I would try creating a FormFieldInput manually and seeing if you can get a field to lock. If so, it should be fairly easy to fix in JSON schema parsing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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