How To Easily find Drupal Web-Form ID ?

  0 comments
Share

We are exploring two easy way to find the Drupal Web-Form ID.

1. By source code

If you need to find the ID for a given Drupal webform, you just need to look in the code. So if you're in Firefox you can use the cool keyboard shortcut (ctrl + u), or in chrome just right click and view page source to see the html mark-up.

When viewing the page source code, do a find (ctrl + f) for "form_id", this will show you a hidden field in your Drupal form that has an id and a value.

form id source

The value is what you're looking for, that's the actual id of the form!

2. By inspect element

  • Open your webform page and inspect it. For this right-clicked on the form and selected ?Inspect Element?:

    Source code

  • Take a look on attached image the selected text is the ID of the form
  • Replace the hypen with underscore. ex:-- if you found ID "webform-client-form-2" then webform ID will be "webform_client_form_2"

Really helpful for use with modules such as Captcha and reCaptcha for Drupal.

Add new comment