Search »

Form Builder


If your form is more than a page, providing some navigation can be an important addition to the form, to improve usability and clarity. It lets users to see how many steps are in the form, how they are progressing, and the option to click back to a previously edited page.

The Navigation template works by looping through all pages in the $nav_pages variable and displaying the appropriate label and link.

Here's some example code:

What this code does is compare each page number against the current page being rendered. If it hasn't been passed yet, only the label is shown. If it's the current page, it adds a special CSS class to it. If the page has been passed, it provides a link back to it. The CSS layer handles the styles for each nav item.