I updated to webform 3.11 for D7 and I cannot seem to set the alignment for textarea labels. Textfields have the setting to place them above, inline or none.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | webform_inline_label_textarea-1216192.patch | 857 bytes | quicksketch |
| #7 | label-position-settings-for-textareas-1216192-7.patch | 950 bytes | carwin |
| #7 | label-position-settings-for-textareas-1216192-7.jpg | 18.34 KB | carwin |
| #1 | textarea-label.png | 49.51 KB | quicksketch |
Comments
Comment #1
quicksketchThere is no "Inline" setting, but you can still hide the label of a textarea. It's displayed as a checkbox instead of a select lists though.
Comment #3
amir simantov commented@quicksketch
This is still needed for the situation where the label should be placed inline.
Comment #4
quicksketchThe trouble with this is that you could only make a textarea display inline with a significant amount of CSS (you'd need to float the label and field left for example), which would often result in broken layouts depending on the markup and theme around the elements. You can enable the "Inline" option in Webform through hook_webform_component_info_alter(), but you would also have to make changes in your theme's CSS to accomodate for it. I don't plan on providing this as a built-in option.
Comment #5
amir simantov commentedOK, got it mate! Thanks!
Comment #6
amir simantov commentedComment #7
carwin commentedI'm re-opening to submit a patch which resolves the problem in what is, essentially, the only way we can -- thanks to the wrapper around textareas from our good friends at form.inc.
The patch applies inline-block to the textarea wrapper only when "inline" is chosen from the component settings. Otherwise, it behaves as normal.
If I can get this branch RTBC I'll make my way back to 7.x-3.x and so on and so forth.
Comment #8
quicksketchThanks @carwin! This looks promising. Obviously such sophisticated selectors wouldn't be very IE compatible. I wonder if this would work with IE8 even. Still its interesting what options we've got with CSS3 like this.
Comment #9
quicksketchI adjusted this patch to avoid use of the "sibling" (+) selector, which makes this compatible down to IE7 in my testing. That's plenty good enough for today's world. We can backport this to D6, but my preference is to keep new features in 4.x only.
Comment #10
quicksketch