'select', '#title' => t('Preview the page with themes available'), '#..." />

How do I add an onchange handler to a dropdown list in Drupal?

You can add a form like this: hook_form() { $form1"dropdown" = array( '#type' => 'select', '#title' => t('Preview the page with themes available'), '#options' => $ptions, '#default_value' => 'defalut_value', '#attributes' => array('onchange' => "form. Submit('dropdown')"), ); //Submit button: $form1'submit' = array( '#type' => 'submit', '#value' => t('Submit '), '#attributes' => array('style' => 'display: none;'), ) Now you can add submit functionality using hook_submit().

You can add a form like this: hook_form() { $form1"dropdown" = array( '#type' => 'select', '#title' => t('Preview the page with themes available'), '#options' => $ptions, '#default_value' => 'defalut_value', '#attributes' => array('onchange' => "form. Submit('dropdown')"), ); //Submit button: $form1'submit' = array( '#type' => 'submit', '#value' => t('Submit '), '#attributes' => array('style' => 'display: none;'), ); Now you can add submit functionality using hook_submit().

If you generate another form field by using this drop down. Then use AHAH for that. $form'my_form_submit' = array( '#type' => 'submit', '#value' => t('Submit'), '#weight' => 1, '#submit' => array('my_form_submit'),//none JS version '#ahah' => array( 'event' => 'click', 'path' => 'mymodule/js', //Your ajax function path 'wrapper' => 'myform-wrapper', 'method' => 'replace', 'effect' => 'fade', 'progress' => array( 'type' => 'bar', 'message' => t('Loading...') ) ).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions