I have some issues with the submit button after upgrading from 2.x -> 3.0-beta2. In particular when I have a textarea as the last component, it is really difficult to properly format the position of the submit button.

I would therefore like to request a two changes in how containers/divs for components are handled:
-) Additionally to the classes "webform-component-xxx" [xxx in (textarea, textfield, etc.)], please add a css class "webform-component" so that all components can be formatted with one css rule independent of their type
-) The submit button is contained in a <div>. Can you please give this

a specific id or class?

And another question: Any clue why the captcha is in another place in forms that have a textarea as the last element (below the submit button) than the ones that do not have a textarea (above the submit button)?

Thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

I'm not familiar with how Captcha places it's elements on the page, though Webform 3 puts all buttons in $form['buttons'], which is a common convention so it should be able to determine where the buttons live fairly easily. Captcha may be set at a hard-coded weight, in which it's not the textarea that's the problem, but simply the number of the elements in the form. I'm not sure about this, your best bet is to file an issue with Captcha.

Regarding your request (also in the future, please do not throw in multiple questions in the same issue): I didn't realize that there was a DIV already around the buttons, seems like an unintended side-effect. Though I think it would make sense to put a class on these, either "buttons" or "webform-buttons".

Adding the class "webform-component" to the wrapper seems like a good idea.

In Drupal 7, we'll be able to eliminate this extra wrapper around all form elements (right now there's the Webform div, then the Drupal "form-element" div right inside of it, then the element), because in D7 we can finally override all form element wrappers at once, rather than needing to completely retheme all form elements just for webform.

quicksketch’s picture

Status: Active » Fixed
FileSize
2.42 KB
7.88 KB

I've applied the following patches. One to add the "webform-component" class to all wrapper divs, the second to add a class and wrapper to the set of buttons. When looking at Drupal 7, I found that they've actually named the wrapper "actions" instead of "buttons", so I've updated our wrapper to reflect that.

Status: Fixed » Closed (fixed)

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