Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

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

Why does SS strip my <form> out of a page?


Go to End


4 Posts   2409 Views

Avatar
TCJeter

Community Member, 17 Posts

18 August 2009 at 10:38am

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

Avatar
scpi

Community Member, 21 Posts

19 August 2009 at 9:03am

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.

Avatar
neonfrog

Community Member, 10 Posts

23 September 2009 at 2:41am

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...

Avatar
tomfromdare

Community Member, 2 Posts

25 September 2009 at 2:45pm

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>