More in this section

Forums / Developing with Sitefinity / Can I make a form withought using a widget?

Can I make a form withought using a widget?

2 posts, 0 answered
  1. Leif
    Leif avatar
    1 posts
    27 Jul 2012
    27 Jul 2012
    Link to this post
    Seems counterproductive I know but I have a circumstance where I need to put a form in a div in a content block.

    Sounds simple enough but the form builder only allows me to make the form not the surrounding div and in the page edit area I can only drop the raw form widget in the content block.

    I would love to make this form + surrounding div a little custom widget all it's own.

    Can someone direct me to a resource I can read up on how to do this?
    Is this even possible?

  2. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    18 Jul 2012
    27 Jul 2012
    Link to this post
    is the reason you need a container div to give it a class/style name?

    If so you may be able to accomplish this by setting the CssClass property for the widget. If you open the Advanced settings for almost any widget on the page, you will find a CssClass property. add your class here and it will be added to the wrapping div automatically!

    Sometimes, this property is already populated with a value (such as sfContentBlock) if this is the case, simply add a space then append your class to the propety.

    I hope this is helpful! you've inspired a new video for the Sitefinity Guru blog, I'll post it over the weekend, thanks for the idea!

    if this isn't what you were attempting to accomplish, please let me know more details and I'll do what I can to help!!
2 posts, 0 answered