7 replies [Last post]
jasonabc's picture
Offline
Uber Donor
Joined: 05/05/2008
Juice: 573
Was this information Helpful?

Hi all - I have added a couple of attribute textfields to some of my products. One is for a name, the other is for a number. The name cannot be more than 10 characters. The number cannot be more than 2 characters. How can I set this in the attribute area of UberCart so my textfields are validated or cannot be submitted if too many characters have been typed out ? It seems a really basic and fundamental piece of functionality that is missing but maybe I am looking in the wrong place.

thanks

Jason

bhallnc's picture
Offline
Joined: 03/23/2009
Juice: 81
Re: Attribute texfield - validation on length possible??

I am actually looking for this same feature.

There is a module that allowed for this in D5 (http://www.ubercart.org/contrib/5341) but it hasn't been ported to D6. His reasoning for this is that Validation API does the same thing. I have tested Validation API and it really is time consuming to add validation to attribute text fields. I have searched for a few days and can't find any alternatives.

Does anybody already have the Max Chars for Text Attributes ported to D6? If not, anybody interested in porting this to D6? It would make things so much easier to be able to apply validation on the attributes page.

jasonabc's picture
Offline
Uber Donor
Joined: 05/05/2008
Juice: 573
Re: Re: Attribute texfield - validation on length possible??

yep I saw that too. No D6 port at the moment. Very surprised that UberCart doesn't have this built into its attribute management - seems a pretty standard feature in my experience. Hopefully someone has a suggestion (I'm betting it's going to be along the lines of writing a module and a shit load of code (as usual).

Jason

bhallnc's picture
Offline
Joined: 03/23/2009
Juice: 81
Re: Re: Re: Attribute texfield - validation on length possible??

FYI - I have paid to have the Max Chars for Text Attribute to be ported to Drupal 6 by the original contributor. It should be completed by tomorrow and posted on Drupal.org. I will post a link and update once it is ready.

jasonabc's picture
Offline
Uber Donor
Joined: 05/05/2008
Juice: 573
Re: Re: Re: Re: Attribute texfield - validation on length possib

awesome - will definitely help out with testing etc

cheers

Jason

bhallnc's picture
Offline
Joined: 03/23/2009
Juice: 81
Re: Re: Re: Re: Re: Attribute texfield - validation on length po

The Max Characters for Text Attributes has been ported to Drupal 6 and can be found at: http://drupal.org/project/uc_attribute_length

cYu converted the module to Drupal 6 and did a fantastic and prompt job.

jasonabc's picture
Offline
Uber Donor
Joined: 05/05/2008
Juice: 573
Re: Re: Re: Re: Re: Re: Attribute texfield - validation on lengt

I installed this on D6.15 and UC2.2 and spent an hour testing it thoroughly. It works beautifully. No issues or bugs.

Hats off to Brian and Chris for this essential and very much needed contribution.

thanks

Jason

itserich's picture
Offline
Joined: 11/10/2010
Juice: 6
Re: Re: Re: Re: Re: Re: Attribute texfield - validation on lengt

Yes thank you much.