Can I make a form withought using a widget?

Posted by Community Admin on 04-Aug-2018 04:29

Can I make a form withought using a widget?

All Replies

Posted by Community Admin on 27-Jul-2012 00:00

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?

LC

Posted by Community Admin on 27-Jul-2012 00:00

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

This thread is closed