Saturday 30 May 2015

How to remove auto completion for text fields in DRUPAL?

Add the following attribute to form variable, autocomplete="off"
Ex:
$form['firstname'] = array(
            '#type' => 'textfield',
            '#weight' => 0,
            '#attributes' => array(
                         "autocomplete"=>"off",
    )

No comments:

Post a Comment

Your comment is so valuable as it would help me in my growth of knowledge.