multistep forms

bluetegu - June 1, 2009 - 16:27
Project:Maxlength
Version:5.x-2.0-beta2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Thanks for a great module!

Attached please find a patch that helped me use maxlength for limiting the title length in step 2 of a multistep form. The patch ensures that drupal_add_js($js_settings, 'settings') is called only once. Otherwise the value of the limit attribute is written as limit="limit,limit" instead of limit="limit".

feedback appreciated,
Bluetegu

AttachmentSize
maxlength_multistep.patch973 bytes

#1

dereine - June 6, 2009 - 16:24

could you also add a reset parameter?

additonal

$jsadded = TRUE;

could be in the "if"

#2

bluetegu - June 6, 2009 - 16:17

Hi dereine,

Attached please find a patch which takes into account that the function can be called twice, for different fields. I've tested this in my 2 step multiform with both title and body limits and it worked fine. Let me know whether this answers your concern.

Thanks
Bluetegu

AttachmentSize
maxlength_multistep1.patch 985 bytes

#3

Drupal-Tech - June 27, 2009 - 09:04

same problem is also in D6, i have tried to implement above patch in D6.. but its not working.

 
 

Drupal is a registered trademark of Dries Buytaert.