3

Sometime back I'd gone through a Lullabot video that showed me how to simply click a form and see all its elements using Krumo using Devel module.

But I've searched all internet I'm not able to find this feature. How do I simply click a form and see all of it's elements in Krumo?

3

You need just to implement the hook_form_alter in a test module this way:

function MYMODULE_form_alter(&$form, $form_state, $form_id) {
  switch ($form_id) {
    case 'taxonomy_form_term':
      dpm($form);
      break;
  }
}

where $form_id is form identifier (in the example code I captured the new taxonomy term entry form) which you can find through firebug.

| improve this answer | |
  • Thanks but I want a tool so that I can click any form and see its arguments. – AgA Oct 12 '11 at 16:17
  • If you want to see every form you can just remove the switch from the code above, leaving only dpm($form). Of course Devel must be enabled. – DarthDrupal Oct 13 '11 at 7:35
1

It has been a while since I touched this, but you may be referring to Devel Themer. Devel had this functionality, but it had been spun off separately to Theme Developer.

| improve this answer | |
  • I've checked it it does show something in Kromo but could not verify if those data are of the clicked form... – AgA Oct 12 '11 at 16:17
1

Krumo is a replacement for print_r() and var_dump(). Have you tried Devel + Theme Developer module? They are a must.

Krumo is included inside Devel module as stated here: http://drupal.org/project/krumo

If you have drush installed alread the commands are:

$ drush dl devel devel_themer
$ drush en devel devel_themer

Otherwise you need to download them via drupal.com and manually install and activated them.

Here is a screencast about debugging: http://ftp.drupal.org/files/videocasts/moshe-theme-developer.mov Good Luck!

| improve this answer | |
1

Try the Drupal For Firebug module.

| improve this answer | |
  • Thanks but it wasn't using this module. – AgA Oct 12 '11 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.