From c87a5d6806d18dc70fb5f67c0e95ce315563a4f7 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 18 Jun 2013 17:03:06 +0000 Subject: [PATCH] Implement csv max,display for custom field text length --- etemplate/js/et2_extension_customfields.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/etemplate/js/et2_extension_customfields.js b/etemplate/js/et2_extension_customfields.js index e26403e4de..fd2648117b 100644 --- a/etemplate/js/et2_extension_customfields.js +++ b/etemplate/js/et2_extension_customfields.js @@ -380,7 +380,13 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput field.type = 'textbox'; attrs.rows = field.rows; - attrs.size = field.len; + + if(field.len) + { + var size = field.len.split(','); + attrs.maxlength = size[0]; + attrs.size = size.length > 1 ? size[1] : size[0]; + } return true; }, _setup_select: function(field_name, field, attrs) {