Need help on the Webform Module

Hello,

There's a massive Data collection Application that i'm working on. It has almost 52 forms with an average of 100 fields per form. So, after looking through the available modules that could help achieve this functionality, I've settled down for Webform Module. But this doesn't suffice all the requirements of this application.

Feature Requests:

  1. Autocomplete Form Component - accomplished
  2. Grids of textfields (accomplished),date fields (accomplished),select boxes,checkboxes
  3. AHAH enabled fields
  4. Displaying a group of radio buttons on the same line. While using grouped radio buttons (i.e only one option can be selected) each radio button slides down to the next line
  5. Partial Form Submission. Saving each stage of a multi-page form

I'd appreciate help on achieving the above feature requests.

  1. Project Page http://drupal.org/project/webform
  2. Webform Issues http://drupal.org/project/issues/7404

How to apply the patch

  1. Copy the patch file to the modules directory same as your webform module
  2. $patch -p0 < webform-6.x-2.6.patch_.txt


Drupal version 6.9
Webform version 6.x-2.6

AttachmentSize
webform-6.x-2.6.patch_.txt10.43 KB
Groups:
Login to post comments

Feature Request 4 (Updates)

kevin.gomes - Tue, 2009-02-10 11:39

This was pretty straightforward. I'm using the garland theme. I created two functions in the template.php
phptemplate_form_element($element,$value)
phptemplate_radios($elment)

Did the following in each of the functions

  1. Changed all the <div> to <span>
  2. added a style attribute in the <label> to look like <label style="display:inline;">

This also reflected on the textfields which was something that i wanted to happen. Now even the textfields are displayed beside the labels.

Find the Attachment below

AttachmentSize
theme form elements.txt 2.19 KB

Feature Request 1 (Updates)

kevin.gomes - Sat, 2009-03-07 03:41

The textfield Component now takes in a new parameter Autocomplete Path. If this value is available, the textfield becomes an Autocomplete field else it has the usual behaviour. This value is to be set while creating new textfield Component.

Find the attached patch above.

Code Changes:

Modified the textfield.inc in the components directory. I'm testing the patch. Till then add the following to the end of the function _webform_edit_textfield($currfield) before the return $edit_fields

$edit_fields['extra']['autocomplete_path'] = array(
'#type' => 'textfield',
'#title' => t('Autocomplete Path'),
'#default_value' => $currfield['extra']['autocomplete_path'],
'#description' => t('Autocomplete Path for the textfield.') .' '. t('Leaving blank will render it as a normal textfield.'),
'#size' => 20,
'#maxlength' => 200,
'#weight' => 4,
);

and
the following Code at the end of the function _webform_render_textfield($component) before return $form_item

if(trim($component['extra']['autocomplete_path'])) {
$form_item['#autocomplete_path'] = $component['extra']['autocomplete_path'];
}

Known Bugs:

  • The Autocomplete DIV doesn't begin exactly below the textfield. There's a wide gap between them.