I created a webform with 4 fields. Three are textfields and one is a date field. The text fields have maxlength and width set for them. Since saving the form, I am getting the following error every time I access the form.
Notice: Undefined index: #maxlength in clientside_validation_webform_after_build_recurse() (line 269 of /var/www/d7dir/sites/all/modules/clientside_validation/clientside_validation.module).
Notice: Undefined index: #maxlength in clientside_validation_webform_after_build_recurse() (line 269 of /var/www/d7dir/sites/all/modules/clientside_validation/clientside_validation.module).
Notice: Undefined index: #maxlength in clientside_validation_webform_after_build_recurse() (line 269 of /var/www/d7dir/sites/all/modules/clientside_validation/clientside_validation.module).
Notice: Undefined index: #maxlength in clientside_validation_webform_after_build_recurse() (line 269 of /var/www/d7dir/sites/all/modules/clientside_validation/clientside_validation.module).

I have this module, webform, webform validation and webform conditional modules enabled.

Here is the html that was generated for the first text field of the form:

<div id="webform-component-first-name" class="form-item webform-component webform-component-textfield">
<label for="edit-submitted-first-name">
First Name
<span class="form-required" title="This field is required.">*</span>
</label>
<input id="edit-submitted-first-name" class="form-text required" type="text" maxlength="25" size="25" value="" name="submitted[first_name]">
</div>

The other textfields look similar. The maxlength property is set. Also can't really tell if the textfields are even the problem, maybe it's looking for a maxlength on the date field(s)? ...

FWIW, I'm using the Stark 7.0 theme while developing the site.

Comments

cjscullyca’s picture

Title: No id="maxlength" » undefined index: #maxlength

On a hunch I tried two tests to try to isolate the cause of the above error.
First I added a select options component to the webform. This caused two additional lines of the above error message to show up when the saved form was accessed.
Second I deleted both the date field and the select options and the error messages completely disappeared.
So the problem is that it's looking for a maxlength property on form components that don't (and shouldn't) have maxlength properties.

attiks’s picture

can you try the latest dev version

cjscullyca’s picture

Installing the latest dev version fixed the problem.

attiks’s picture

Status: Active » Closed (fixed)