How do we disable AutoComplete (Browser Cached Data) for all fields in Apigee Developer Portal ?
~~Q:S:S~~
Solved! Go to Solution.
We can use autocomplete attribute on form fields and set it to off.
so in any our custom module implement hook_form_alter and code inside will look like
Disable on complete form.
function my_module_name_form_alter(&$form, &$form_state, $form_id) { // Add form id condition to disable it on specific forms. // else this will disable autocomplete on all forms. $form['#attributes']['autocomplete'] = 'off'; }
The above code will disable autocomplete on complete form for specific fields use.
Disable on specific field.
function my_module_name_form_alter(&$form, &$form_state, $form_id) { // Add form id condition where your field is present. $form[<field_name>]'#attributes']['autocomplete'] = 'off'; }
Or it can be done by jquery code
Disable autocomplete on each input field by jquery.
$('input').attr('autocomplete', 'off');