Skip to content

I want to request a readonly option field in the string widget #7483

@adwaitlearn

Description

@adwaitlearn

Is your feature request related to a problem? Please describe.

Currently, the string widget only supports the default and hidden options. However, I have a scenario where I need to display certain fields like “Author” to the user, populated via cookie information, but I do not want the user to be able to edit this field. Since there’s no built-in readonly option, I’m forced to either disable the field (which prevents selecting/copying) or create a custom widget (which increases complexity).

Describe the solution you'd like

I’d like to see a readonly option added to the string widget. When readonly is set to true, the widget should render the field as a read-only input:

  • The value remains visible to the user
  • The field cannot be edited
  • The text can still be selected and copied by the user

This aligns with common UX patterns (like HTML’s <input readonly>).

Describe alternatives you've considered

  • Custom widgets: More effort to maintain and ensure consistency with the rest of the application.
  • Hidden fields: Not helpful here because I do want the user to see the field’s value.

Additional context

This feature would simplify the handling of metadata fields (like Author or Timestamps) that should be visible but not editable by the user. It would reduce the need for workaround solutions and improve the overall user experience.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featurecode contributing to the implementation of a feature and/or user facing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions