WARNING: concrete5 5.6 and earlier are end-of-life. Sales from the marketplace have now ended. Click here to learn more about this transition.

Form Tableless Layout

A custom template for the built-in form block that outputs HTML as a series of labels and divs (instead of table rows and table cells). Every element is given a class or wrapped in a div with a class, so you can easily style forms via your theme's CSS code.

To use this custom template, first add a "form" block to your page (or visit a page that already has a form block on it and click "Edit Page"), then click on the form block and choose "Custom Templates" from the popup menu. Then choose "Form Tableless Layout" from the dropdown menu, then click the "Update" button.

To find out what classes you need to style in your CSS, look inside the package directory for a file called "SAMPLE_OUTPUT.html" -- this will show you every possible field that the form block could output, along with the divs, labels, and classes. This should give you a good idea of how to set up the proper style rules in your theme's CSS file.

This template is useful even if you don't like the way it outputs elements and classes, because I have extensively cleaned up the default form template so it is *much* easier to work with. Simply edit this file to change the form HTML:
YOURSITE/packages/form_tableless_layout/blocks/form/templates/tableless_layout.php

If you want this template to be automatically used for every form block on your site (or prevent your users from having to remember to choose it every time), you can copy this file:
YOURSITE/packages/form_tableless_layout/blocks/form/templates/tableless_layout.php
to this directory:
YOURSITE/blocks/form/
and then rename the new copy to "view.php". Now it will completely override the built-in form HTML without you having to choose it as a custom template.

NOTE: This block is for web designers only! If you are not comfortable with CSS and don't know how to create or modify theme files, this will not do you any good!

 

 

Add to Cart

Sales have ended due to EOL

Approved by PRB

Our 30 Day Support Policy

  • Replies to tickets every few days.

Support Hosted

  • On marketplace.concretecms.com