Developer forum

Forum » CMS - Standard features » Styling the old forms module

Styling the old forms module

Hans Ravnsfjall
Reply

Hi

I have a costumer that would like to use the old forms module since it´s the most intuitive way to create forms in Dynamicweb for non-technicians. But the problem is, we would like to be able to style the form.

Since there is no template file, we can´t add classes of our own :( Why can´t the system add eg. the system name as a Class, or an auto incrementing class to all td. and input elements?

 

Anybody got a useful fix/solution for this problem?

 

 


Replies

 
Morten Bengtson
Reply

You can target elements in CSS without any classes by using more advanced selectors...

http://www.smashingmagazine.com/2009/08/17/taming-advanced-css-selectors/

It might not be possible to solve all issues, but you should be able to achieve some pretty nice results this way.

 
Mikkel Ricky
Reply

I like Morten's suggestion, but it may require a lot of work depending on the styling requirements. You can also use a piece a JavaScript to add classes – I did it on the UserManagement module on my example site for the Dynamicweb Tech Conference 2014: https://github.com/dynamicweb/tech-conf-2014/blob/master/Files/Templates/Designs/tech-conf-2014/UserManagement/CreateProfile/CreateProfile.cshtml#L145.

Have you considered using items and the item creator instead of the (old) forms module? We're doing this on our new company website, e.g. http://dynamicweb.com/request-a-demo.

Best regards,
Mikkel  

 
Anders Ebdrup
Reply

Hi Hans,

 

We have some times used the ".Replace()" tag-extension method: http://templates.dynamicweb-cms.com/TemplateTags/Dynamicweb-template-tags/General-tags/Tag-extensions.aspx for adding classes in the old form module, but this is too a bit hacky.

If you are using items then be aware, that is it still not possible to have files uploaded.

 

Best regards, Anders

 

You must be logged in to post in the forum