First time when I tried this module, I thought that read-only was actually a field which is disabled. So I thought that it would be great to have that widget too.

Comments

imiksu’s picture

Status: Active » Needs work
StatusFileSize
new1.7 KB

I've attached a patch which shows the proposed direction of implementation. The widget is working currently with 'text' field type.

The basic idea is to re-use the original widget and use that as "base widget". Then we just call the form for that widget and make it disabled.

TODO

  • Ensure all field types which is possible to be disabled (by FAPI)
  • Make "base widget" as a setting, currently it gets field types' default widget and uses that as base widget
  • Think a way to handle multi column fields
imiksu’s picture

StatusFileSize
new1.83 KB

This patch also handovers the widget settings and tells the widget module. There was a conflict where Field API thought that widget was by field_extrawidgets module instead text module.

TODO: Also discovered that something needs to be done for widget settings. I think the setting should be handled by "base widget"?

Note: First patch was against beta1, this one is against current dev.