Form API adds word "edit" in ID of every Form element FORM API adds word "edit" before the id of any form element. When I have to use the element in JS  I have to add "edit" before element id.

Example if I have element $form['curdate'] then in drupal_add_js('#edit-curdate');

Why so
Drupal adds edit to denote that the element is an input element. It helps to identify form elements through CSS, and reduces the possibility of ID clashes with other elements on the page.

In case you're interested, this is done in the form_builder() function...and there's no easy way to override it system-wide.

You can easily override it for individual form elements though if it's bothering you:

$form['element'] = array(
  '#type' =&gt; 'textfield',
  '#title' =&gt; 'Some title',
  // ...
  '#id' =&gt; drupal_html_id('my-new-id')
);