News:

Support the VirtueMart project and become a member

Main Menu

Need hack to limit characters to 16 for Custom Attributes

Started by hotchicksmart, October 14, 2008, 07:31:29 AM

Previous topic - Next topic

hotchicksmart


sobers_2002


hotchicksmart

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.

scwebit

Did this work? If kishoreonwork had a solution I'd love to see it. Thanks!

ulctoday

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.

mwf

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.
Professional Joomla Development and Support
http://www.exps.ca

Template Designer

You can refer to the joomla search function. It limits 20 characters.
VirtueMart Templates gear up your sales...

domin8tor24

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.

mwf

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).
Professional Joomla Development and Support
http://www.exps.ca

domin8tor24

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!

vnguru

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 )

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


domin8tor24

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!