Closed (won't fix)
Project:
Webform
Version:
7.x-4.0-alpha9
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
31 Jul 2013 at 10:03 UTC
Updated:
2 Nov 2014 at 20:36 UTC
Jump to comment: Most recent
Comments
Comment #1
quicksketchOnly textfield-based components have the ability to be "read-only", it's just not a feature of other widgets. This is largely because the HTML spec only supports an attribute called "readonly" on certain fields, so those are the ones that Webform provides a read-only option for.
Comment #2
thekevinday commentedThe problem here is that webform is using "disabled" differently than what the HTML language defines it as.
By "Disabled", webform means "Read-only".
The HTML language (shortsightedly IMHO) decided to prevent readonly from being applied to select fields.
However, the usage of the HTML "Disabled" functionality does apply and likely has the desired effect that is being requested here.
This should be a feature request to:
- This is problematic because it would require a database upgrade and could confuse users who got used to the incorrectly used terminology.
- I believe I heard somewhere that 'disabled' form fields do not get sent to the server and are not intended to be processed whereas readonly fields are (this statement needs confirmation).
- If that is the case, then the usage of (the proper) 'disabled' would be improper here if the values of the field are expected.
- But this is where the HTML language short-sightedness causes a problem.
- see: http://www.w3.org/TR/html5/forms.html#the-readonly-attribute
- from the above link:
- It DOES make sense to have a read-only select list where the values are sent to the server, but should be disabled in that it is selectable only under certain conditions but the value should always be sent to the server.
We cannot do much about the standard, but perhaps having both a "Disabled" and a "Readonly" option that end users can choose at their own discretion would be a good feature to add (where applicable).
There also seems to be another issue on this: #1701514: Date Disabled.
Should this be switched to 7.x-4.x-dev instead of 7.x-4.0-alpha9?
Comment #3
quicksketchThis is true, and the main reason why we use readonly instead of the disabled attribute. From a non-HTML perspective, I think the term "disabled" is fine for most users (who don't know the difference between readonly and disabled anyway).
Disabled in general causes a whole boatload of problems. The fact it doesn't get submitted in POST means the values don't get saved, which isn't expected. One way you can support it is by using a placeholder element that is disabled while a hidden element actually submits the value. But that approach (and most other hacks) far outweigh the ease of simply using readonly and calling it good.
Comment #4
danchadwick commentedAlso sprach quicksketch.