how to add a class div on drupal 7 webform element? webform generated each form component in this structure

&lt;div&gt;
  &lt;label&gt;&lt;/label&gt;
  &lt;input&gt;&lt;/input&gt;
&lt;/div&gt;


I like to add a div class on each input element

&lt;div&gt;
  &lt;label&gt;&lt;/label&gt;
  &lt;div class="xxxx"&gt;&lt;input&gt;&lt;/input&gt;&lt;/div&gt;
&lt;/div&gt;


I looked into the form alter to alter form element with #field_prefix and #field_suffix

$form['submitted']['chinese_name']['#field_prefix'] = '&lt;div class="abc"&gt;';
$form['submitted']['chinese_name']['#field_suffix'] = '&lt;/div&gt;';


but it didn't work.
You are using the incorrect keyword, the correct way to add a prefix to the webform field is:

$form['submitted']['chinese_name']['#prefix'] = '&lt;div class="abc"&gt;';
$form['submitted']['chinese_name']['#suffix'] = '&lt;/div&gt;';