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.

Comments

quicksketch’s picture

Category: bug » support
Status: Active » Fixed
StatusFileSize
new49.51 KB

There 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

amir simantov’s picture

Version: 7.x-3.11 » 7.x-3.17
Status: Closed (fixed) » Active

@quicksketch
This is still needed for the situation where the label should be placed inline.

quicksketch’s picture

The 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.

amir simantov’s picture

OK, got it mate! Thanks!

amir simantov’s picture

Status: Active » Closed (works as designed)
carwin’s picture

Version: 7.x-3.17 » 7.x-4.x-dev
Assigned: Unassigned » carwin
Category: support » feature
Status: Closed (works as designed) » Needs review
StatusFileSize
new18.34 KB
new950 bytes

I'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.

quicksketch’s picture

Thanks @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.

quicksketch’s picture

Status: Needs review » Fixed
StatusFileSize
new857 bytes

I 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.

quicksketch’s picture

Title: No display setting for texatarea label » Add inline label display setting for texatareas

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.