Author Topic: Disable length limitation in form fields  (Read 1510 times)

Jor

  • Sr. Member
  • ****
  • Posts: 421
    • ICQ Messenger - 10401286
    • AOL Instant Messenger - jor otf
    • Yahoo Instant Messenger - jor_otf
    • View Profile
    • http://members.outpost10f.com/~jor/
    • Email
Disable length limitation in form fields
« on: August 21, 2001, 02:40:48 PM »
This simple filter will clear all maxlength statements in forms, so you can enter as much data as you want.
Some uses: extend taglines in chat rooms, or give a longer comment in guestbooks.
Be warned if you use this, that there is usually a good reason this is activated: several CGI scripts cannot parse strings over a certain length.

[Patterns]
Name = "Kill maxlength= in forms"
Active = TRUE
Limit = 100
Match = "maxlength=1"
Replace = "maxfoo=1"


Edited by - Jor on 21 Aug 2001  15:47:29
 

Jor

  • Sr. Member
  • ****
  • Posts: 421
    • ICQ Messenger - 10401286
    • AOL Instant Messenger - jor otf
    • Yahoo Instant Messenger - jor_otf
    • View Profile
    • http://members.outpost10f.com/~jor/
    • Email
Disable length limitation in form fields
« Reply #1 on: April 07, 2002, 02:46:21 PM »
I've updated this filter, it's a lot smarter now and now only targets actual <input> fields.

Since sometimes a script checks if you do not exceed the maxlength, I've included the old maxlength in a title -- this way the maxlength value will be reported to you when you hover the mouse over it, either in a pop-up box or in the status bar (browser and settings-dependant). It now also uses the $AV method, to get it to work with quoted values.

Name = "Remove length limit in input fields"
Active = TRUE
Bounds = "<input*>"
Limit = 1024
Match = "1 maxlength=$AV(*2) 3"
Replace = "1 title="maxlength: 2" 3"


Note: this is a newer version of this filter than the one included in my complete filter set.

Edited by - Jor on 07 Apr 2002  16:17:13
 

Arne

  • Administrator
  • Hero Member
  • *****
  • Posts: 778
    • ICQ Messenger - 1448105
    • AOL Instant Messenger - aflaaten
    • Yahoo Instant Messenger - arneflaa
    • View Profile
    • http://
    • Email
Disable length limitation in form fields
« Reply #2 on: April 07, 2002, 02:58:40 PM »
When I change
Replace = "1 title="maxlength: 2" 3"
to
Replace = "1 title='maxlength: 2' 3"
it works like a charm


Best wishes
Arne
Imici username: Arne
Best wishes
Arne
Imici username= Arne

Jor

  • Sr. Member
  • ****
  • Posts: 421
    • ICQ Messenger - 10401286
    • AOL Instant Messenger - jor otf
    • Yahoo Instant Messenger - jor_otf
    • View Profile
    • http://members.outpost10f.com/~jor/
    • Email
Disable length limitation in form fields
« Reply #3 on: April 07, 2002, 03:03:53 PM »
Thanks Arne... I see the problem :)

Altering AVQ() to AV() also solves this. (Filter has been edited


Edited by - Jor on 07 Apr 2002  16:16:26
 

Jor

  • Sr. Member
  • ****
  • Posts: 421
    • ICQ Messenger - 10401286
    • AOL Instant Messenger - jor otf
    • Yahoo Instant Messenger - jor_otf
    • View Profile
    • http://members.outpost10f.com/~jor/
    • Email
Disable length limitation in form fields
« Reply #4 on: June 03, 2002, 12:05:47 PM »
Current version of this filter:

[Patterns]
Name = "Remove length limit in input fields"
Active = TRUE
Multi = TRUE
URL = "$TYPE(htm)"
Bounds = "<inputs*>"
Limit = 1024
Match = "1 maxlength=$AV(*2) 3"
Replace = "1 title="maxlength: 2" 3"


The former maxlength value is put in the title, so it should show up in your browser's status bar when you hover the mouse over it, or as a pop-up.



Edited by - Jor on 18 Jun 2002  15:44:45