A simple, small add-in that adds an editable class against each webform component to the webforms module.
Link: http://drupal.org/sandbox/CarlHinton/1623142
Git repository:
git clone --recursive --branch master {username}@git.drupal.org:sandbox/CarlHinton/1623142.git webform_classes
For Drupal 6.x and Drupal 7.x

Reviews of other projects
http://drupal.org/node/1626848#comment-6121972
http://drupal.org/node/1488328#comment-6122358
http://drupal.org/node/1612460#comment-6122498

Comments

KrisBulman’s picture

Status: Active » Needs work

This is another great module, I'm always looking to add classes to webform components. IMO this should be in the webform module, it's the missing feature. Have you created an issue on adding this?

Are there plans to add the ability for multiple classes?

This review is for the 7 branch only:

There is an unneeded file in the 7.x-1.x branch called webform_classes.infor

ventral.org/pareview reports 0 errors
codesniffer locally reports 0 errors

coder reports 1 small nitpick:

webform_classes.module

    severity: normalLine 59: Arrays should be formatted with a space separating each element and assignment operator

        'class'=> $class,

Manual testing: After adding a field, viewing the form, then clicking edit on the form to view the classes, a class of "webform" is automatically inserted.

carlhinton’s picture

The module will already allow you to add multiple classes to a component; simply leave a space between the classes that you add to the classes field.

carlhinton’s picture

Thanks for spotting the unneeded file - this has now been removed

carlhinton’s picture

I have added the space into line 59

carlhinton’s picture

I have contacted the guys caring for webform via email. I am awaiting their response.

KrisBulman’s picture

If it already allows for multiple classes, the help text should state as much.

carlhinton’s picture

Good point - I have updated the code to include this in the description for the field. The update is in git.

KrisBulman’s picture

Status: Needs work » Closed (duplicate)

Closing this as it's a duplicate of #1623178: [D6] webform classes

avpaderno’s picture

Title: webform classes » [D6] webform classes
Issue summary: View changes
Related issues: +#1892212: [D6] Project Management for Agile