From dcba97a2aec4bff430cf6ffc49891ae82f072471 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 11 Jul 2012 20:30:33 +0000 Subject: [PATCH] Fix custom field filtering --- etemplate/js/et2_extension_customfields.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etemplate/js/et2_extension_customfields.js b/etemplate/js/et2_extension_customfields.js index 2665f61080..6d1ed78635 100644 --- a/etemplate/js/et2_extension_customfields.js +++ b/etemplate/js/et2_extension_customfields.js @@ -81,9 +81,9 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput } var types = this.options.customfields[field_name].type2.split(","); this.options.fields[field_name] = false; - for(var i = 0; i < types; i++) + for(var i = 0; i < types.length; i++) { - if(jQuery.inArray(types[i],split) > 0) + if(jQuery.inArray(types[i],this.options.type_filter) > -1) { this.options.fields[field_name] = true; continue;