VirtueMart Forum

VirtueMart General => Commercial Jobs => Topic started by: hotchicksmart on October 14, 2008, 07:31:29 AM

Title: Need hack to limit characters to 16 for Custom Attributes
Post by: hotchicksmart on October 14, 2008, 07:31:29 AM
I have a product that needs to be personalized.
Title: Re: Need hack to limit characters to 16 for Custom Attributes
Post by: sobers_2002 on October 21, 2008, 12:26:56 PM
could you give some more details ?
Title: Re: Need hack to limit characters to 16 for Custom Attributes
Post by: hotchicksmart on October 26, 2008, 00:04:23 AM
It is a personalized dog tag that has 5 lines of text but they can only be 16 characters in length.  I used custom attribute but you can type in more than 16 characters.
Title: Re: Need hack to limit characters to 16 for Custom Attributes
Post by: scwebit on April 24, 2009, 18:16:28 PM
Did this work? If kishoreonwork had a solution I'd love to see it. Thanks!
Title: Re: Need hack to limit characters to 16 for Custom Attributes
Post by: ulctoday on July 18, 2010, 11:25:18 AM
Was there an answer for her question?   I see it mentioned that someone told her "check pm for more details."   Is that something that can be shared with the rest of us?  I have this same requirement and looking for a solution.
Title: Re: Need hack to limit characters to 16 for Custom Attributes
Post by: mwf on July 20, 2010, 11:52:35 AM
Hello,

I have developed a solution for this.
Please PM the details of your requirement.

Solution includes:
Custom attribute bug fixes
Change in behavior when custom attribute empty (now allowed)
Change input to textarea to allow multi-line input
Limit number of characters input by parameter
Display counter of remaining characters.
Title: Re: Need hack to limit characters to 16 for Custom Attributes
Post by: Template Designer on July 27, 2010, 10:07:06 AM
You can refer to the joomla search function. It limits 20 characters.
Title: Re: Need hack to limit characters to 16 for Custom Attributes
Post by: domin8tor24 on July 26, 2011, 07:02:13 AM
I would love to know how to do those above things, would be amazing for my clients website. If anyone could help, that'd be great.

Cheers!

Quote from: mwf on July 20, 2010, 11:52:35 AM
Hello,

I have developed a solution for this.
Please PM the details of your requirement.

Solution includes:
Custom attribute bug fixes
Change in behavior when custom attribute empty (now allowed)
Change input to textarea to allow multi-line input
Limit number of characters input by parameter
Display counter of remaining characters.
Title: Re: Need hack to limit characters to 16 for Custom Attributes
Post by: mwf on July 26, 2011, 13:53:44 PM
There are couple of things that need to be done.
First override the behavior of custom attributes in the VM template to switch from an input box to a textarea.
Next add JavaScript to control input into the textarea (custom attribute).
Title: Re: Need hack to limit characters to 16 for Custom Attributes
Post by: domin8tor24 on August 04, 2011, 12:45:16 PM
Quote from: mwf on July 26, 2011, 13:53:44 PM
There are couple of things that need to be done.
First override the behavior of custom attributes in the VM template to switch from an input box to a textarea.
Next add JavaScript to control input into the textarea (custom attribute).

Thanks so much for the response!

I kind of get where you're coming from, but if it's not too much trouble, would you be able to quickly explain just a bit further what you've outlined?

I've searched high and low for where exactly to override the behaviour of the custom attributes, but every modification doesn't really make an effect.

This would be greatly appreciated. Cheers!
Title: Re: Need hack to limit characters to 16 for Custom Attributes
Post by: vnguru on August 06, 2011, 06:19:59 AM
Quote from: hotchicksmart on October 26, 2008, 00:04:23 AM
It is a personalized dog tag that has 5 lines of text but they can only be 16 characters in length.  I used custom attribute but you can type in more than 16 characters. (Viec Lam  (http://www.nghenghiepviet.com))

This is not take much time. do you have any other stuffs for that?

Title: Re: Need hack to limit characters to 16 for Custom Attributes
Post by: domin8tor24 on August 16, 2011, 05:49:50 AM
Thanks for the reply, would you be able to expand on what you've described a little more. I've had a good play around with editing files the last week weeks, just cant seem to do the trick. Cheers!