Drupal 5 is great, and I am currently developing a test site using various modules. I have having some trouble with the WebForms module. I can get the module to render a form the way I want, but I am unable to invoke the form validation.
I wrote the following function in the 'Additional Validation' textarea just to find out if the validation function is being called or not.
webform_client_form_validate($form_id, $form_values)
{
print_r($form_values);
form_set_error('', print_r($form_values));
if ($form_values['Name'] == 'test')
{
form_set_error('', t('You must select a different name for this group of settings.'));
}
}
Can someone direct me to how I can get this working.
Using the Form Builder module's customize form option on the form created by the webforms module, I managed to get the form id. I am not sure of the form id displayed by form builder is the same as the form id set by the webforms module
$form = array (
'#id' => 'webform-client-form',
'#prefix' => '',
'#suffix' => '',
'#method' => 'post',
'#action' => '/contact/webform?q=node/7&formbuilder_form=webform_client_form',
'#value' => '',
);
$form['submitted']['1169923424']['1169923471'] = array (
'#title' => 'Name',
'#type' => 'textfield',
'#default_value' => 'rakeshcp',
'#required' => '1',
'#weight' => '0',