DotNetNuke, ASP.NET, Web Development Blog

Styling the DotNetNuke Form and List module

The are lots of very powerful forms modules available for DotNetNuke, but many of them seem like overkill for what we are usually looking for. The Form and List module often meets our functional needs when we are looking for a simple form module but in the past, I was disappointed with the look of the forms it produced.

The Form and List team, (mostly Stefan Cullmann), has done a nice job of adding features to improve the styling options. In particular, I like the ability to use CSS and Separators/Fieldsets for form layout.

Stefan wrote a brief blog showing how he styled the Feedback Form on the site. We used that as our starting point for a membership form we created and found we needed some additional tweaking to get the form looking just right...

Here are the steps we took to make the form look just right:

  1. In the Form And List Configuration, we set Form Layout to "DIV and Custom CSS", we set Send Buttons to "HTML Buttons", and we set Width of Edit Controls to "Full (100%)"
  2. We copied the CSS from Stefan's form and pasted it into our skin.css
  3. We modified the colors a bit in the css to better fit with the design of the site

 Things were looking much better at this point, but some of the fields were jumbled together, most of the text boxes were smaller than we liked, and some needed to be larger than the others. So we made these additional changes (you'll need to tweak these for your form):

  1. For div.UDT_Input, we set a min-width of 200px to make the textboxes wider.
  2. For the captions, we didn't want them to wrap so we did two things:
    1. Specified white-space:nowrap for the .UDT_Caption
    2. we adjusted the width of the caption of our two checkboxes .UDT_Field .UDT_Type_Boolean .UDT_Caption {width:170px;}
  3. We Added a clear:left to the styling of the checkboxes so they would display on separate lines rather than getting jumbled together: .UDT_Field .UDT_Type_Boolean {clear:left;}
  4. For the "Areas you hunt:" and "Other Sportsmen’s Clubs & Conservation Org.:" we specified specific widths in the CSS Style property for those controls in the Form and List Configuration page so that we could make those text boxes wider than the others. It'd be nice if you could specify a class rather than just CSS but it works.

Otherwise, it was just a matter of tweaking some of the other widths and padding to get it just right. You can download our CSS to help you with your own forms.

As always, It takes a bit of effort to learn and get it just right, but you should be able to achieve your desired look without too much fuss.


Beverly Says:
10/18/2014 3:15:44 AM
I'd like to update the CSS on a form I am building but I'm pretty new at DNN and websites and am unlclear where on the server to upload this additional CSS file and where to reference this additional CSS file in the original CSS. I appreciate any guidance you can provide.
Leave a Comment
Email: (not displayed)

Enter the code shown above:

Return to previous page