VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: graaooor on February 24, 2014, 11:55:09 AM

Title: Custom field : How to add details and javascript
Post by: graaooor on February 24, 2014, 11:55:09 AM
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