More in this section

Forums / Developing with Sitefinity / using HTML editor to create a form

using HTML editor to create a form

11 posts, 0 answered
  1. Wendy Fox
    Wendy Fox avatar
    5 posts
    Registered:
    05 Aug 2009
    05 Aug 2009
    Link to this post
    Hi,

    I am very new to Sitefinity and I am trying to use the HTML editor to create a form.

    It will accept basic fields, like  

                <input type="text" size="20" name="first_name" maxlength="40" id="first_name" /><br />

    but will not accept my submit button

       <input type="submit" name="submit" />

    Can anyone help me?

    Obviously, I'm not the webmaster. However, right now there is no webmaster--I have kind of limited access to get some marketing projects done. All I really need to do is get the "submit" button working on this form.

    I don't understand why an error is being displayed when I try to use this very basic HTML.

    Thanks,

    Wendy

  2. Josh
    Josh avatar
    19 posts
    Registered:
    24 Jun 2009
    05 Aug 2009
    Link to this post
    Wendy, are you using the generic content control in a page and then trying to put HTML in?
  3. Wendy Fox
    Wendy Fox avatar
    5 posts
    Registered:
    05 Aug 2009
    05 Aug 2009
    Link to this post
    Yes.

    Is there a better / different way to do it?

    Thanks for your quick reply, Josh.
  4. Josh
    Josh avatar
    19 posts
    Registered:
    24 Jun 2009
    05 Aug 2009
    Link to this post
    Wendy, nope, thats usually the best way to put HTML in - I just wanted to make sure we were on the same page.  I am somewhat new to Sitefinity, but not to development in general.  I think the problem comes from using mulitple form tags in one page. 

    Sitefinity renders everything in one large form tag.  When you try to use another form tag inside a generic content section, it craps out.  See this: http://www.sitefinity.com/support/kb/sitefinity-3-x/more-than-one-form-tag-causes-sitefinity-to-crash.aspx

    Not sure if this is the issue, but I know i have been creating user controls in visual studio and adding them into the sitefinity web.config to fit the same purpose.  They are then available to be accessed by the users in the Sitefinity UI.

    I know some of this may be a little confusing since, as you mentioned, you are not a developer.  Shoot me any questions if you need to...I will keep an eye on this thread.

    Josh
  5. Josh
    Josh avatar
    19 posts
    Registered:
    24 Jun 2009
    05 Aug 2009
    Link to this post
    Wendy can you paste all the html you were trying to enter in the generic control?
  6. Wendy Fox
    Wendy Fox avatar
    5 posts
    Registered:
    05 Aug 2009
    05 Aug 2009
    Link to this post
    I can past the HTML into the generic control; and, when I click on "preview," it looks perfect. However, if I then try to publish the page, that's when I get the error.

    I saw the page about multiple form tags. I am not quite sure how to deal with this issue since I don't have Visual Studio (I could perhaps get a trial, but I'm not sure how much it would help--I did try to upload a form someone else had created that was .aspx, with little luck).
  7. Josh
    Josh avatar
    19 posts
    Registered:
    24 Jun 2009
    06 Aug 2009
    Link to this post
    I actually, I misspoke - i meant "can you paste the HTML you were trying to use into the forums" so i could see it...but no matter.

    Yeah, I got that same issue when trying to recreate your bug.  I tried adding a form to a generic control, and adding a submit button.  I ended up having to log out, log back in and delete the control.  Sitefinity has problems with that multiple form tag.

    I use Visual Studio 2008, but i think Sitefinity will also work with Visual Studio Express (which is free: Download *select web developer version).  If this is incorrect someone please interject.  Anyway, if you need this kind of functionality, I think the best answer is to create a user control (.ascx) and upload that into sitefinity.  If you had someone write this into a .aspx, they could rewrite it as a user control which you can upload to the site.

    Is that a possibility?

    Josh
  8. Wendy Fox
    Wendy Fox avatar
    5 posts
    Registered:
    05 Aug 2009
    06 Aug 2009
    Link to this post
    Josh, thanks so much for your detailed answers. This is really helpful to me. I will check out the free download.

    Thanks again!!

    Wendy
  9. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    07 Aug 2009
    Link to this post
    Hi Josh,

    Thank you for your help in our forums! We have updated your Telerik account for that. 

    All the best,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
  10. Brian
    Brian avatar
    14 posts
    Registered:
    01 Dec 2007
    07 Aug 2009
    Link to this post
    just a note, the limitation is not from Sitefinity at all.

    the problem is with ASP.Net only wanting one form on the page.  All the content is already wrapped into the <form> tag so if you try to add a form via Generic Content, you will have nested another form tag under the orginal.

    another problem you will probably encounter is when users hit the Enter key to submit your form.. Its not going to work the way you expect.  You will need to set the default button on the form, or add a panel.

    <form defaultbutton="btnSubmit" ruant="server"> 
    OR
    <asp:Panel defaultbutton="btnSubmit" runat="server">

    just a heads up



  11. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    12 Aug 2009
    Link to this post
    Hello Brian,

    Yes, this is 100% correct. In addition to your post, I would like to provide the following KB Article - http://www.sitefinity.com/support/kb/sitefinity-3-x/more-than-one-form-tag-causes-sitefinity-to-crash.aspx

    Perhaps it will be helpful for someone.

    Regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
Register for webinar
11 posts, 0 answered