---
title: "Hubspot Form Block - CoderPad Styleguide"
description: "Get the latest tips on hiring the best coders. Coderpad's blog is here to make technical hiring easier."
canonical: "https://coderpad.io/styleguide/hubspot-form-block/"
---
1. [Styleguide](https://coderpad.io/styleguide/) /
2. [HubSpot Form Block]

# HubSpot Form Block

Embed a HubSpot form into a WordPress post using the form’s ID.

Run the following snippet in your JavaScript dev console to show all hidden fields

```
// Inputs within a HubSpot iframe
var theIframe = document.querySelector(".hs-form-iframe");
if (theIframe) {
    var iframeDoc = theIframe.contentWindow.document;
    var iframeInputs = iframeDoc.querySelectorAll('input[type="hidden"]');
    for (var i = 0; i < iframeInputs.length; i++) {
        iframeInputs[i].type = "text";
    }
    var iframeDivs = iframeDoc.querySelectorAll("div.hs-form-field");
    for (var i = 0; i < iframeDivs.length; i++) {
        iframeDivs[i].style.display = "block";
    }
}

// Inputs directly injected into the page by HubSpot
var theInputs = document.querySelectorAll('form input[type="hidden"]');
for (var i = 0; i < theInputs.length; i++) {
    theInputs[i].type = "text";
}
var theDivs = document.querySelectorAll("form div.hs-form-field");
for (var i = 0; i < theDivs.length; i++) {
    theDivs[i].style.display = "block";
}
```

## Examples

## Register for webinar

## Label

## Where is this block used?

This block is used on 8 different URLs

Post Type | Post ID
[Request a CoderPad Play demo](https://coderpad.io/platform/play/request-a-coderpad-play-demo/) | Page | [39822](https://coderpad.io/)
[CoderPad Map](https://coderpad.io/coderpad-map/) | Page | [36953](https://coderpad.io/)
[Outsourced EMEA SDR Form](https://coderpad.io/outsourced-emea-sdr-form/) | Page | [36704](https://coderpad.io/)
[Partner Form](https://coderpad.io/partner-form/) | Page | [35993](https://coderpad.io/)
[Outsourced SDR Form](https://coderpad.io/outsourced-sdr-form/) | Page | [35177](https://coderpad.io/)
[Press Releases](https://coderpad.io/press-releases/) | Page | [34064](https://coderpad.io/)
[LinkedIn Learning Form](https://coderpad.io/linkedin-learning-form/) | Page | [32941](https://coderpad.io/)
[Press](https://coderpad.io/press/) | Page | [8612](https://coderpad.io/)

## Source Files

[Login to WordPress to see source file details.](#)
