News:

Looking for documentation? Take a look on our wiki

Main Menu

Custom field : How to add details and javascript

Started by graaooor, February 24, 2014, 11:55:09 AM

Previous topic - Next topic

graaooor

Hello,
I would add :
- A maxlength propertie for an input custom field
- A call to a javascript function

I think that the modification must be done in the file "plugins/vmcustom/textinput/textinput.php" and for the function "plgVmOnDisplayProductVariantFE".

I did this in an previous version of virtuemart and modify $html  :
$html='<input class="'.$class.'" type="text" MAXLENGTH="25" value="" size="'.$field->custom_size.'" name="customPlugin['.$field->virtuemart_custom_id.']['.$this->_name.'][comment]" onkeypress="return verif(event);"><br />';

How can I do that now ?
Thanks