webform email field autocomplete I can quite easily add ajax autocomplete properties to a regular textfield using the code below, but it doesn't work when I change the field to type webform_email. Is it possible to do?

function flower_order_form_alter(&amp;$form, &amp;$form_state, $form_id) {
    if ($form_id == 'webform_client_form_68911') {
        //Add autocomplete fields for manager username
        $form['submitted']['name_of_authorising_manager']['#autocomplete_path'] = 'user/autocomplete';  
    }
}


Here's the dpr output for the relevant field in the form:

Array
(
    [#type] =&amp;gt; webform_email
    [#title] =&amp;gt; Name of authorising manager:
    [#title_display] =&amp;gt; inline
    [#default_value] =&amp;gt; 
    [#required] =&amp;gt; 1
    [#weight] =&amp;gt; 4
    [#description] =&amp;gt; 
    [#attributes] =&amp;gt; Array
        (
            [class] =&amp;gt; Array
                (
                    [0] =&amp;gt; email
                )

        )

    [#element_validate] =&amp;gt; Array
        (
            [0] =&amp;gt; _webform_validate_email
        )

    [#theme_wrappers] =&amp;gt; Array
        (
            [0] =&amp;gt; webform_element
        )

    [#translatable] =&amp;gt; Array
        (
            [0] =&amp;gt; title
            [1] =&amp;gt; description
        )

    [#webform_component] =&amp;gt; Array
        (
            [nid] =&amp;gt; 68911
            [cid] =&amp;gt; 18
            [pid] =&amp;gt; 0
            [form_key] =&amp;gt; name_of_authorising_manager
            [name] =&amp;gt; Name of authorising manager:
            [type] =&amp;gt; email
            [value] =&amp;gt; 
            [extra] =&amp;gt; Array
                (
                    [title_display] =&amp;gt; inline
                    [private] =&amp;gt; 0
                    [disabled] =&amp;gt; 0
                    [unique] =&amp;gt; 0
                    [width] =&amp;gt; 
                    [description] =&amp;gt; 
                    [attributes] =&amp;gt; Array
                        (
                        )

                    [conditional_component] =&amp;gt; 
                    [conditional_operator] =&amp;gt; =
                    [conditional_values] =&amp;gt; 
                )

            [mandatory] =&amp;gt; 1
            [weight] =&amp;gt; 4
            [page_num] =&amp;gt; 1
        )

    [#webform_private] =&amp;gt; 0
    [#validated] =&amp;gt; 1
    [#webform_validated] =&amp;gt; 
)
You can only use type of fields which are defined in hook_element_info.

List all the type of elements using drush by:

drush ev "print_r(array_keys(module_invoke_all('element_info')));"


If you don't need to use Webform email, check the Email field module how it's implementing such element type. See: Usage of email field with the form API.