I am trying to create a form which will style nice using bootstrap to look like one of the forms in the link

twitter bootstrap forms

However if I add the form tag to the content editor web part I recieve an error message that says form tags are not allowed in the content editor web part.

How can I use the twitter bootstrap to style forms without this?

  • Have you tried the HTML Forms Web Part? – user2536 Apr 29 '14 at 22:43
  • Daniel I get an error an error which says cannot retrieve properties at this time when I try using the HTML forms web part. – Miyagi Apr 29 '14 at 23:03

This is a limitation (a.k.a. "feature") of the ASP.NET platform altogether. ASP.NET platform allows a single <form> tag. It actually looks like <form runat="server">, and it's main purpose is to submit the complete page for the ASP.NET framework to process.

That being said, you can overcome this limitation by transforming any <form> tags into either <div> or <fieldset>, and changing the CSS styles to point to those tags instead of the <form> tag.

fieldset { /* copy styles from form */ }

  • @Codec your edit removed relevant content. You removed <fieldset> from the body of the answer, it now reads <div> or ,. That doesn't make sense anymore. Also added a semicolon after <form> which is bad syntax. I would appreciate edits and reviews from being more careful, mostly if it's only aesthetics. By polishing the format you changed the meaning and added new syntactically wrong elements. – Amadeo Gallardo Jun 5 '16 at 15:00
  • 1
    Sorry @amadeo next time I will be more careful – Codec Jun 5 '16 at 15:13
  • Thanks, appreciated! Can you fix the edit? Otherwise I'll flag it so that it can be fixed. Thanks – Amadeo Gallardo Jun 5 '16 at 16:24
  • @AmadeoGallardo Click on the "edited X hours ago" link and scroll down to your original answer. Click rollback and your original answer will come back on display. – Benny Skogberg Jun 6 '16 at 5:47

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.