I am trying to create a custom block with the following embed code in D7:

<form style="border:1px solid #ccc;padding:3px;text-align:center;"     action="http://tinyletter.com/pumpbeat" method="post" target="popupwindow" onsubmit="window.open('http://tinyletter.com/pumpbeat', 'popupwindow', 'scrollbars=yes,width=800,height=600');return true">
  <p>Enter your email address:</p>
  <p><input type="text" style="width:140px" name="emailaddress"/></p>
  <input type="hidden" value="1" name="embed"/>
  <input type="submit" value="Subscribe" />
  <p><a href="http://tinyletter.com">A TinyLetter Email Newsletter</a></p>

In D7 I go to Structure > Blocks > Add block, then paste the embed code into the Body field, and choose PhP code as the text format (I have also tried plain text and full html, without success).

However, rather than displaying the desired widget the new block displays the embed code above.

Please note that I also have the WYSIWYG module installed (with CK editor).

I would really appreciate any help in solving this problem. Thanks!


1 Answer 1


WYSIWYG editor sees this code as a normal text.You should copy this text in source(There is a source or html button in WYSIWYG toolbar) or disable rich text box and then copy it to your text area.

Also you should use drupal form api to insert forms to your pages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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