Jump to:

2011 Posts in 1436 Topics by 620 members

Form Questions

SilverStripe Forums » Form Questions » Why does SS strip my <form> out of a page?

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1454 Views
  • TCJeter
    Avatar
    Community Member
    17 Posts

    Why does SS strip my <form> out of a page? Link to this post

    I have a client's site setup with a very simple form: username and password. It simply posts (securely) the info to a remote site where it logs the user in and they can go from there. It's basically a duplicate of what the third party has on their site; makes it a bit more seamless.

    I inserted the form via the HTML option and it was there and working just fine...until I upgraded SS (v.2.3.3). Now for some reason the form will not stay when I 'INSERT' the HTML data back into the working page draft - it's getting stripped out.

    Why is this? How can I get it working as it was?!?

    Thanks in advance - TC

  • scpi
    Avatar
    Community Member
    21 Posts

    Re: Why does SS strip my <form> out of a page? Link to this post

    The CMS seems to eat all <form> elements. I'd guess that you'll either have to build the form as explained in Tutorial 3 or maybe just create a special page for that form and include the HTML in the .ss template.

  • neonfrog
    Avatar
    Community Member
    10 Posts

    Re: Why does SS strip my <form> out of a page? Link to this post

    Easier than that.. tiny MCE has configurable valid elements.. just search code for valid_elements and add form and all form attributes to valid elements...

  • tomfromdare
    Avatar
    Community Member
    2 Posts

    Re: Why does SS strip my <form> out of a page? Link to this post

    I've found "form" to exist in tiny_mce_src.js, and added "|name" to the list, as "method" and "action" were already there. STILL my insertion is stripped completely, after logging out and back in before inserting code. This did not happen in the previous version, from last December's installation.

    Why is it stripping valid HTML without warning? Must I build code to get around an editor that thinks it knows more than I do?

    What's wrong with:
    <form name="PrePage" method = "post" action = "https://BlahBlahBlah/Payment.aspx"> <input type = "hidden" name = "LinkId" value ="3e1fc7ec-fb5f-4677-bfa6-de" /> <input type = "submit" value = "Cynthia's Payment" /> </form>

    1454 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.