I've tried to insert a paypal form + button on a component's type description and once I save a part of the code is gone.


<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">


<form method="post" target="_top">

Paypal form + button is working properly on Articles, but it's not working on Components. I would create a href link instead, but I need form fields info, and it seems I can only get the info with an input button.

I've also tried to insert an iframe and once I save it gets erased completely. It's working on Articles, tho.

  • What are you editing and with what? Dec 18, 2014 at 15:46
  • I've changed to JCE Editor, but still form action does not save.
    – aerish
    Dec 18, 2014 at 16:15

1 Answer 1


Most probably your article editor (TinyMCE?) is cleaning up your code. This is expected behavior by default. Both <iframe> and <form> are among the tags that are removed automatically by TinyMCE. There are a couple of ways around this:

  1. Use Sourcerer, a plugin that lets you add HTML (and other kinds of code) directly inside your articles. There's a lot of documentation at their website.

    Here's an example of how you can use it:

    {source}<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">{/source}

    or this if you still have problems:

    {source}[[form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"]]{/source}
  2. Use another editor (JCE, for example). Note that JCE still might clean up your code, depending on the settings. Another problem with this approach is that if the content is opened and saved with a different editor (e.g. by another user), the code might be removed again.

  3. Use a module that allows custom code, e.g. Custom HTML Advanced. Install the module, publish it with your code to a custom position (e.g. "MyPaypalCode"), and write {loadposition MyPaypalCode} in your article where you want the code to appear.
  • I've changed to JCE Editor, but still form action does not save.
    – aerish
    Dec 18, 2014 at 16:16
  • JCE also does some code cleaning, depending on your settings. Try Sourcerer (I've updated the question with an example). Install the plugin and make sure you enable it in the plugin manager.
    – johanpw
    Dec 18, 2014 at 16:25
  • in TinyMCE all the restricted element are mentioned in its plugin parameters. So you can change these parameter to work with iframe and scripts in editor
    – Nick
    Dec 19, 2014 at 5:04
  • 1
    @johanpw Thank you! Sourcerer is working perfectly with {source}[[form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"]]{/source}
    – aerish
    Dec 19, 2014 at 10:38

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.