This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Form fields are being stripped out

  • Creator
    Topic
  • #7499
    srumery
    Participant

    I have a page that needs a form inserted but the fields keep getting stripped out. Any reason why this would happen?

    This is what I need on the page:

    <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="hosted_button_id" value="XXXXXXXXXXXXX">
    <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
    <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
    </form>

    This is what remains after the page us published/updated:

    <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
    
    <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
    </form>
Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #7513
    Jason Bobich
    Keymaster

    In what context are we talking about? Where are you putting this into?

    #7523
    srumery
    Participant

    I am simply pasting the html into the content body of a page in the page editor. I also added it to a text widget and got the same result. I can make a screencast to show you. Can I send a private link?

    #7535
    Jason Bobich
    Keymaster

    None of this would have anything to do with the theme. The theme doesn’t sanitize when saving anything from a page or widgets. Are you doing this from an administrator-level account? Or some other user-level? Have you tried posting on wordpress.org? This is the best place for general WordPress support. You’ll get a lot more eyes on your question.

    #7548
    srumery
    Participant

    Thank you for the response. I have been working with JumpStart quite a bit and hadn’t seen that yet so I wanted to eliminate it.

    #7549
    Jason Bobich
    Keymaster

    I had asked about the admin-level user role because out of curiosity, I pasted your code into a WordPress page on my end and it all saved fine. In general is that admin-level users have different capabilities for posting “unfiltered” html content into pages and posts than a standard editor would, I believe. If you’re on an admin-level account, you may want to run through any plugins that could be effecting content when saved (that would be odd though for a plugin to mess with that… I guess that’s a difficult judgement to make just in general).

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.