Identify form control id in Drupal 7 Forms API does form controls in Forms API have id's? Below is my sample code:

function myid_user_page_form(){  
    $form = array();
    $form['id'] = array(
        '#type' =&gt; 'fieldset',
        '#title' =&gt; t('ID Information'),
        '#collapsible' =&gt; TRUE, 
        '#collapsed' =&gt; FALSE,
    );  
    $form['id']['myphoto_button'] = array(
        '#type' =&gt; 'button', 
        '#value' =&gt; '...',
        '#attributes' =&gt; array(
        'onclick' =&gt; "myphoto_options();",),  
    );
    return $form;
}


Sorry for this very simple beginner's question but how to identify my button's id in the sample above?
You can add id to your form like this,

$form['#attributes'] = array('id' =&gt; 'myid');


Also if you want to add class,

$form['#attributes']['class'][] = 'myclass';