Experimental project

This is a sandbox project, which contains experimental code for developer use only.

bagatelle |ˌbagəˈtɛl| noun:
"something regarded as too unimportant to be worth much consideration"

Webform Bagatelles currently adds two functions to Webform.

1) On the Webform -> Form Settings tab, in the bottom fieldset labeled Advanced Settings there's a new radio button selection to control where the Submit/Prev/Next buttons should go on each page of a single or multi-step form. By default Webform puts these buttons at the very bottom of the form, regardless of the way you may wish to arrange your form elements. By selecting Immediately below the last form element that submits data, you give yourself the flexibility to arrange containers and markup components around the form, before or after the actual data submission elements, while keeping the buttons immediately below these at all times.
All this works particularly well in combination with the Webform Layout module.

2) The module exposes in the session and HTML the current step/page number and page count of a multi-step webform. This information can then be picked up by any module or page element to do something with, like step-specific theming/styling or step-dependent visibility of blocks.

For instance a block containing an ad or other info specific to some but not all steps of a multi-page webform can be made visible for only those steps. Use the code snippet below, entered in the text area Pages on which this PHP code returns TRUE:

<?php return webform_bagatelles_page_num_is_above(2); ?>

Note: for the option Pages on which this PHP code returns TRUE to appear on block configuration pages, you must enable the core module PHP filter.

To facilitate fine-grained styling, Webform Bagatelles also adds a handy page identifier to the form's CSS classes, so that you can individually style each step of the multiform:

<form class="webform-client-form webform-client-form-32 webform-client-form-page-3" ...

This module has no permissions or dependencies to deal with. Except for Webform of course.

Supporting organizations: 
all code and documentation

Project information

  • Created by RdeBoer on , updated