History: PluginJq
Source of version: 88
Copy to clipboard
! Plugin JQ This ((wiki plugin)), introduced in ((Tiki3)), allows jQuery JavaScript code to be inserted on a page. {maketoc levels="2,3"} !!# Requirements The jQuery feature must be enabled at __Control Panels > Features > Experimental > jQuery (checkbox)__. !!# Parameters {pluginmanager plugin="jq"} {REMARKSBOX(type="warning" title="Syntax changed since Tiki 7" highlight="y")}Keep in mind that default syntax for tracker fields changed since ((Tiki7)), so that when referring them from within plugin jQuery, you have to update the syntax. ~~red:Tracker field IDs and names have changed to improve consistency: all tracker fields now use -+ins_XX+- , where -+XX+- is the field Id. ~~ For more information, read: http://doc.tiki.org/Tiki7#Upgrade_notes And basic syntax changed after Tiki6: A Simple jQuery line of code looks like this: {CODE(caption="Standard jQuery", colors=javascript)}$("p").show("slow");{CODE} When using the Tiki JQ Plugin in old versions 3 to 5, you needed to start you code with jq: {CODE(caption="Tiki jQuery Call", colors=javascript)}$jq("p").show("slow");{CODE} {REMARKSBOX} !!# Examples !!!# Simple one A Simple jQuery line of code looks like this: {CODE(caption="Standard jQuery", colors=javascript)}$("p").show("slow");{CODE} !!!# Use jQuery Date Picker to input date in a form Example with 2 date field, one for the "date in" and one for the "date out". ''name = the name of your input field, you can use any name permitted by html5'' {CODE(colors="smarty")}{JQ()}$( 'input[name="date_in"]' ).datepicker(); $( 'input[name="date_out"]' ).datepicker();{JQ}{CODE} ~tc~ !!!# Adding other jQuery plugins to your Tiki This plugin allows you to use other jQuery plugins to your Tiki. Let's see how to add __jShowOff__ jQuery plugin as an example: From [http://zukakakina.com/jShowOff+demo|http://zukakakina.com/jShowOff+demo|box] {iframe name="jShowOff in Zukakakina" title="jShowOff demo in Zukakakina" width="100%" height="600" align="middle" scrolling="auto" src="http://zukakakina.com/tiki-index_p.php?page=jShowOff+demo&no_bl=y"}~/tc~ !!!# Special notes: When following above guide, you can only call the included script from the getScript handler. That means, you cannot just include the script under look and feel area, and then use that script from the JQ plugin - the order of loading the script and using it, will conflict. In short: Call your custom script from the getScript handler. When inserting the js to include the script, it HAS to be wrapped in {CODE(wiki="0" colors="smarty")} {jq} and {/jq} {CODE} JQplugin won't substitute to the pretty tracker form, field or design you are require to do. In one sentence; With JQplugin you can add functionnality to an already working pretty tracker. A good practice is to create your tracker, your wiki page do the design you need and test that everything is working fine. Then without touching what's has been done already you can add the JQplugin at the bottom of the wiki page. Fields type are a little different than the one used in the tracker or the pretty tracker. For instance a tracker field id 1 which is a text field should specify as -+ins_1+- . If it is a textarea it is -+ins_1+- also, If a date you have to specify (if need all of them) -+ins_1Day+- , -+ins_1Month+- , -+ins_1year +- . Note also that the syntax use the html form element. Input is an input field, select if for selectable options, etc... To check what is exactly required to use JQ with your tracker you can look at the source of the page (use Firebug or any other tool) and use the exact syntax. !!!# Prefill tracker fields !!!!# Directly at the wiki page __Basic Example A__ For instance, if we want to pre-load some values in a tracker plugin form, where you have text field id's 20, 21, 22, and a textarea field id 23, and you want some text to be preloaded in the fields 22 and 23 of your form, we can use something like the syntax below (in a tiki 3, 4, 5 or 6 site as such): {CODE(caption="jQuery code since Tiki7+ to add in the wiki page where the tracker plugin call is located" wrap="1" colors="javascript")}{$f_22} {JQ()} $("#ins_22").val("foo or bar"); // to prefill a text field, option1 $("#ins_23").val("first line of text\nsecond line\nthird line"); // to prefill a text area $("#ins_3572").text("Text"); // to prefill a text field, option 2 $('[name="ins[3496]"]')[1].checked=true; // to prefill a checkbox $("select[name=ins_91]").val("foo") // to prefill a drop down field $("select[name='ins_92[]']").val("6") // to prefill a category field shown as a drop down {JQ}{CODE} And if you want those values to be pre-filled in your form only when there is not previously saved content in that tracker field for that item (remember you can edit tracker items also from wiki pages), the syntax is: {CODE(caption="jQuery code since Tiki7+ to add in the wiki page where the tracker plugin call is located", colors=javascript, wrap="1")}{JQ()} if (!$("#ins_22").val()) { $("#ins_22").val("foo or bar"); } if (!$("#ins_23").val()) { $("#ins_23").val("first line of text\nsecond line\nthird line"); } if (!$("#ins_3572").val()) { $("#ins_3572").text("Text"); } if (!$('[name="ins[3496]"]')[1].checked) { $('[name="ins[3496]"]')[1].checked=true; } if (!$("select[name=ins_91]")[0].selectedIndex) { $("select[name=ins_91]").val("foo") } {JQ}{CODE} __Basic Example B__ You can use some value defined in some other html input in the same wiki page: {CODE(colors=htmlmixed, wrap=1)} {HTML()}<input type="hidden" name="testingr" id="testingr" value="temp3" />{HTML} {CODE} In this case below, field 91 is a dropdown field: {CODE(colors=javascript, wrap=1)} {JQ()} if (!$("select[name=ins_91]")[0].selectedIndex) $("select[name=ins_91]").val($("#testingr").val()) {JQ} {CODE} __Basic Example C__ Using the id & name "routput" generated by a ((PluginR)) call: {CODE(colors=javascript, wrap=1)} {DIV(class="hidden")}{R()}a<-1:10; cat(mean(a));{R}{DIV} {JQ()} if (!$("#other_ins_92").val()) $("#other_ins_92").val($("#routput").text()){JQ} {CODE} __Basic Example D__ You can use some value defined in some other html input in the same wiki page: {CODE(colors=htmlmixed, wrap=1)} {HTML()}<input type="hidden" name="mydate" id="mydate" value="{display name="tracker_field_mydate" format="date"}" />{HTML} {CODE} In this case below, field 46 is a text field, and we want it hidden for the end user, that's why we end up appending the last jquery part -+.parents(".form-group").hide()+-: {CODE(colors=javascript, wrap=1)} {JQ()} if (!$("#ins_46")) $("#ins_46").val($("#mydate").val()).parents(".form-group").hide() ; {JQ} {CODE} !!!!# By means of a wiki page used as a smarty template ('Pretty trackers') This case is needed when you are adding some prefill by means of a smarty template which resides ona wiki page. This is very useful when you use ((PluginR)) in advanced mode with ((Pretty Trackers)), for instance, to mix R code and html forms to collect parameter data managed by tiki trackers. The smarty template allows inserting data from tracker item fields in R scripts. Example: {CODE(caption="Prefilling tracker item fields since Tiki7+ from smarty templates in wiki pages", colors=javascript, wrap="1")} {wikiplugin _name=jq}if (!$("#ins_22").val()) $("#ins_22").val("foo or bar"); {/wikiplugin} {wikiplugin _name=jq}if (!$("#ins_23").val()) $("#ins_23").val("first line of text\nsecond line\nthird line"); {/wikiplugin} {wiki} * field 22 is: {$f_22} * field 23 is: {$f_23} {/wiki} {CODE} !!!# Pre-fill with css styles The pre-filling performed by jQuery can be done with some style, to indicate the user that this content comes from a suggestion when the field in the tracker form is empty (yet) for that item. Thus, in the first example above ("__Prefill tracker fields > Directly at the wiki page__"), if you want those values to be prefilled in your form only when there is not previously saved content in that tracker field for that item AND with some css style like background color light yellow, font color grey and in italics, the syntax is: {CODE(caption="jQuery code since Tiki7+ to add in the wiki page where the tracker plugin call is located", colors=javascript, wrap="1")}{JQ()} if (!$("#ins_22").val()) { $("#ins_22").val("foo or bar"); $("#ins_22") .css('background-color', 'lightyellow') .css('font-style', 'italic') .css('color', 'grey') .focus(function() { $(this) .css('background-color', '') .css('font-style', '') .css('color', ''); }); } if (!$("#ins_23").val()) { $("#ins_23").val("first line of text\nsecond line\nthird line"); $("#ins_23") .css('background-color', 'lightyellow') .css('font-style', 'italic') .css('color', 'grey') .focus(function() { $(this) .css('background-color', '') .css('font-style', '') .css('color', ''); }); } {JQ}{CODE} !!!# Conditional display of fields !!!!# Example 1 Imagine that you have a form with 15 fields. Field number 10 is a checkbox checked by default, and you want that when field 10 is checked, field 11 (a text area, for instance) is shown. But when field 10 is not checked, fields 12, 13, 14 & 15 are shown instead. You can get the following behavior with the following jQuery syntax: {CODE(caption="Conditional display of fields since Tiki 7+ in the wiki page where the tracker plugin call is located", colors=javascript, wrap="1")}{JQ()} $("input[name=ins_10]").click(function(){ if (this.checked) { $("input[name=ins_10]").parents("tr:first + tr ~ tr").fadeOut('fast'); $("input[name=ins_10]").parents("tr:first + tr ~ tr:first").fadeIn('fast'); } else { $("input[name=ins_10]").parents("tr:first + tr ~ tr").fadeIn('fast'); $("input[name=ins_10]").parents("tr:first + tr ~ tr:first").fadeOut('fast'); } }); $("input[name=ins_10]").parents("tr:first + tr ~ tr").hide(); $("input[name=ins_10]").parents("tr:first + tr ~ tr:first").show(); {JQ} {CODE} __Explanation "for humans"__: ~np~ .parents("tr:first + tr ~ tr") means: the first parent which is a <tr>, go to the next <tr> ("+ tr"), then pick all following <tr> siblings ("~ tr") ~/np~ "tr:first + tr ~ tr:first" is much the same but only select the first sibling !!!!# Example 2 Imagine that you have a form with 15 fields, where you always want to show the first 9 fields, and the last two (14 and 15), and field 10 controls which fields are shown from the numbers 11, 12, 13. Field number 10 is a drop down box, with possible values: empty value (default), TRUE and FALSE. And imagine that you want that when field 10 is set as FALSE, field 11 (a text area, for instance) is shown but not fields 12 (text field), and 13 (drop down with other text field). But when field 10 is set as TRUE, field 11 is hidden, and fields 12 and 13 are shown. And when field 10 is not set (empty value, the default option), fields 11, 12 & 13 are all hidden. You can get the following behavior with the following jQuery syntax: {CODE(caption="Only the text fields for typing are hidden, not the whole row of the html form", colors=javascript, wrap="1")}{JQ()} $("select[name=ins_10]").change(function(){ if ($(this).val() === 'FALSE') { $("input[name=ins_11]").hide(); $("input[name=ins_12]").show(); $("select[name=ins_13]").show(); $("input[name=other_ins_13]").show(); } else if ($(this).val() === 'TRUE') { $("input[name=ins_11]").show(); $("input[name=ins_12]").hide(); $("select[name=ins_13]").hide(); $("input[name=other_ins_13]").hide(); } else { $("input[name=ins_11]").hide(); $("input[name=ins_12]").hide(); $("select[name=ins_13]").hide(); $("input[name=other_ins_13]").hide(); } }); $("input[name=ins_11]").hide(); $("input[name=ins_12]").hide(); $("select[name=ins_13]").hide(); $("input[name=other_ins_13]").hide(); {JQ} {CODE} !!!!# Example 3 This is the same example as [#Example_2|Example 2] but in this case, you want to hide the whole row from the table in the form (and not just hiding the field for typing). You can get the following behaviour with the following jQuery syntax: {CODE(caption="The whole row of the form is hidden for the tracker fields indicated", colors=javascript, wrap="1")}{JQ()} $("select[name=ins_10]").change(function(){ if ($(this).val() === 'FALSE') { $("input[name=ins_11]").parents("tr:first").hide(); $("input[name=ins_12]").parents("tr:first").show(); $("input[name=other_ins_13]").parents("tr:first").show(); } else if ($(this).val() === 'TRUE') { $("input[name=ins_11]").parents("tr:first").show(); $("input[name=ins_12]").parents("tr:first").hide(); $("input[name=other_ins_13]").parents("tr:first").hide(); } else { $("input[name=ins_11]").parents("tr:first").hide(); $("input[name=ins_12]").parents("tr:first").hide(); $("input[name=other_ins_13]").parents("tr:first").hide(); } }); $("input[name=ins_11]").parents("tr:first").hide(); $("input[name=ins_12]").parents("tr:first").hide(); $("input[name=other_ins_13]").parents("tr:first").hide(); {JQ} {CODE} !!!!# Example 4 This is an example that shows how to iterate over a collection of input textboxes in a tracker. First the textboxes is selected and an event that responds to keyboard input is set for each textbox. When text is entered, the textbox below the active one, will be shown. The process repeats until there are no more hidden textboxes left to show. NB. this code will only work with 1 tracker on the page. If you include more trackers on the same page, the script needs to be modified a bit. (see Example 4.1 below) {CODE(caption="The whole row of the form is hidden for the tracker fields indicated", colors=javascript, wrap="1")} {JQ()} $(".wikiplugin_tracker input").each(function() { $(this).keyup(function() { $(this).parents("tr").next().show("slow", "swing"); }).parents("tr").hide(); }); $(".wikiplugin_tracker input:first").parents("tr").show(); {JQ} {CODE} !!!!# Example 4.1 This example shows how to achieve the same functionality as above, but with two different trackers on the same page. {CODE(caption="The whole row of the form is hidden for the tracker fields indicated", colors=javascript, wrap="1")} {JQ()} $("#editItemForm1 input").each(function() { $(this).keyup(function() { $(this).parents("tr").next().show("slow", "swing"); }).parents("tr").hide(); }); $("#editItemForm1 input:first[type=text]").parents("tr").show(); $("#editItemForm2 input").each(function() { $(this).keyup(function() { $(this).parents("tr").next().show("slow", "swing"); }).parents("tr").hide(); }); $("#editItemForm2 input:first[type=text]").parents("tr").show(); {JQ} {CODE} It is worth noting that #editItemForm1 is the form containing the first tracker and #editItemForm2 is the form containing the second tracker. !!!!# Example 5 Hide a field shown in the tracker form which does not contain any text field or checkbox, etc. That's the case of the autoincrement field, which is shown in the ((PluginTracker)) form at item creation time, but it could be very well hidden for the sake of simplicity. If the autoincrement tracker field has id 149, then the code is: {CODE(caption="The whole row of the form is hidden for the autoincrement tracker field indicated", colors=javascript, wrap="1")} {JQ()} $("label[for='ins_149']").parents("tr:first").hide(); {JQ} {CODE} !!!!# Example 6 This example has 1 radio button fields (field 38) as 0=no, or 1=yes. And when the user presses in the option 1=yes, there are 3 fields shown below (fields 39, 46, 47). In addition, the field with the radio button has some css background color provided, which matches the background color of the fields shown when the option "yes" is selected. And when selecting "no", there is an attempt to clear any values which have been provided already to the fields that are being hidden. {CODE(caption="Code", colors=javascript, wrap="1")} {JQ()} $("input[name=ins_38]").change(function(){ if ($(this).val() === '0') { $("input[name=ins_39]").parents("tr:first").hide("slow"); $("input[name=ins_39]").val(""); $("input[name=ins_46]").parents("tr:first").hide("slow"); $("input[name=ins_46]").val(""); $("input[name=ins_47]").parents("tr:first").hide("slow"); $("input[name=ins_47]").val(""); } else if ($(this).val() === '1') { $("input[name=ins_39]").parents("tr:first").show("slow"); $("input[name=ins_46]").parents("tr:first").show("slow"); $("input[name=ins_47]").parents("tr:first").show("slow"); $("input[name=ins_39]").parents("tr:first") .css('background-color', 'lightyellow') .css('font-style', 'italic') .css('color', 'grey') .focus(function() { $(this) .css('background-color', '') .css('font-style', '') .css('color', ''); }); $("input[name=ins_46]").parents("tr:first") .css('background-color', 'lightyellow') .css('font-style', 'italic') .css('color', 'grey') .focus(function() { $(this) .css('background-color', '') .css('font-style', '') .css('color', ''); }); $("input[name=ins_47]").parents("tr:first") .css('background-color', 'lightyellow') .css('font-style', 'italic') .css('color', 'grey') .focus(function() { $(this) .css('background-color', '') .css('font-style', '') .css('color', ''); }); } else { $("input[name=ins_39]").parents("tr:first").hide("slow"); $("input[name=ins_39]").val(""); $("input[name=ins_46]").parents("tr:first").hide("slow"); $("input[name=ins_46]").val(""); $("input[name=ins_47]").parents("tr:first").hide("slow"); $("input[name=ins_47]").val(""); } }); $("input[name=ins_39]").parents("tr:first").hide(); $("input[name=ins_46]").parents("tr:first").hide(); $("input[name=ins_47]").parents("tr:first").hide(); $("input[name=ins_38]").parents("tr:first") .css('background-color', 'lightyellow') .focus(function() { $(this) .css('background-color', ''); }); {JQ} {CODE} !!!!# Other examples: Dynamic (pretty) trackers See http://doc.tiki.org/Pretty+Tracker#Dynamic_Pretty_Trackers to learn other examples of avdanced usage of this PluginJQ plugin with trackers. !!!# Show text inputs with content but non-editable In some cases you may want to show the contents of some tracker field to the user without that chance to edit it. You can achieve so with this simple jquery code below, for a tracker field number 1, in a wiki page with ((PluginTracker)) and some itemId passed in the url: {CODE(caption="Code", colors=javascript)} {JQ()} $("#ins_1").prop('readonly', true); {JQ} {CODE} !!!# Disable some checkboxes when no content found in the corresponding cell The code below disabled checkboxes from the items in a table generated with ((PluginListExecute)) where the 7th column (6th for Jquery, since it starts counting from 0) has no content in the cell. In addition, it disables the select all checkbox, since for some reason allowed to select the disabled ones by the time of this writing: {CODE(caption="Code" colors="javascript")}{JQ()} $("#wplistexecute-1 tbody tr").each(function() { $("input[type=checkbox]", this).prop("disabled", $.trim($("td:nth(6)", this).text()) === ""); $("input[name=selectall]").prop("disabled", true); // select all seems to alway also select disabled ones }); {JQ} {CODE} See the type of output produced: {img src="display1322" link="display1322" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border"} !!!# Changes in dropdown selectors with Chosen jQ plugin You need to add some "__.trigger('chosen:updated');__" From {CODE(caption="Code" colors="javascript")} $("select[name=ins_162]").val("ongoing"); $("select[name='ins_160[]']").val("26"); {CODE} To {CODE(caption="Code" colors="javascript")} $("select[name=ins_162]").val("ongoing").trigger('chosen:updated'); $("select[name='ins_160[]']").val("26").trigger('chosen:updated'); {CODE} Note that in the previous example, field 162 is a standard dropdown field, and field 160 is a category field with a dropdown display mode (notice the single quotes in that category-dropdown case surrounding the __~np~ins_160[]~/np~__. !!!# Disable dropdown selectors with Chosen jQ plugin You can disable the field 162 (being a dropdown field), when chosen jq plugin is in use, with a syntax like: {CODE(caption="Code" colors="javascript")} {JQ()} $("select[name=ins_162]").prop("disabled", true).trigger('chosen:updated'); {JQ} {CODE} !!!# Hide fields in Tiki 15+ (Bootstrap) Use the css selector for the field 162 (being a dropdown field), like: {CODE(caption="Code" colors="javascript")} {JQ()} $(".tracker_field162").parent().hide(); {JQ} {CODE} See examples at the profile "((pr:Conditional_Display_in_Forms_14))" !!!# Advanced: jQuery in Static Text tracker field to synchronize user selector tracker fields From the use case partly covered in the profile "((pr:Custom_Work_Pricing))" !!!!# simplest case {CODE(caption="Code" colors="javascript")} {JQ()} var user_fields = ['230', '302', '303']; jQuery.map(user_fields, function(f){ $('#user_selector_'+f).change(function(sel){ var users = []; jQuery.map(user_fields, function(f){ users = users.concat($('#user_selector_'+f).val()); }); $('#user_selector_229').val(users); }); }); $('#user_selector_229').closest('.form-group').hide(); $('#trackerinput_143').closest('.form-group').hide(); {JQ} {CODE} Explanation: * Fields with Id 230 (Account Managers), 302 (Clients), 303 (Contractors) correspond to user selector tracker fields, one for a different user group. * Field with Id 229 is the generic user selector field, listing all users from all groups, that will be used internally to control permissions on item owners, so that each user can see his/her own items only. (the permission to view items is not granted to the whole tracker, but only items belonging to each user will be seen by them. * Field 143 is the field with this static text field containing this JQuery code. !!!!# updating some status in one other tracker And in case you also want to update some field from another tracker, you can do so with an ajax call fired from inside the jquery plugin. See this enhanced version: {CODE(caption="Code" colors="javascript")} {JQ()} var user_fields = ['230', '302', '303']; $.map(user_fields, function(f){ $('#user_selector_'+f).change(function(sel){ var users = []; jQuery.map(user_fields, function(f){ users = users.concat($('#user_selector_'+f).val()); }); $('#user_selector_229').val(users); $('input[name="ins_241[]"]').map(function(i,el){ $.ajax({ type: 'POST', url: 'tiki-ajax_services.php', dataType: 'json', data: { controller: 'tracker', action: 'update_item', trackerId: 13, itemId: $(el).val(), ins_314: 1 } }); }); }); }); $('#user_selector_229').closest('.form-group').hide(); $('#trackerinput_143').closest('.form-group').hide(); {JQ} {CODE} Explanation: * field 241 is the item_link field from tracker 10 that shows records from tracker 13 * field 314 is the field from tracker 13 that controls the custom processing status of the item (users have been syncronized already - value 2 - or not - value 1). We want to modify the value in this field from whatever it was (usally 2, synchronized) and reset to value 1 (unprocessed). + This way, some ((PluginListExecute)) can filter these "unprocessed" values and run some action on them, plus reset the status flag to 2 (processed), etc. So that permissions based on the user selector field can be set in synchrony among trackers. !!!!# updating some status value in two other trackers And if you want to update several other trackers, not just one, you could use this other syntax. Note that it updates also tracker 11, field 320 wth value 1: {CODE(caption="Code" colors="javascript")} {JQ()} var user_fields = ['230', '302', '303']; $.map(user_fields, function(f){ $('#user_selector_'+f).change(function(sel){ var users = []; jQuery.map(user_fields, function(f){ users = users.concat($('#user_selector_'+f).val()); }); $('#user_selector_229').val(users); $('input[name="ins_241[]"]').map(function(i,el){ $.ajax({ type: 'POST', url: 'tiki-ajax_services.php', dataType: 'json', data: { controller: 'tracker', action: 'update_item', trackerId: 13, itemId: $(el).val(), ins_314: 1 } }); }); $('input[name="ins_272[]"]').map(function(i,el){ $.ajax({ type: 'POST', url: 'tiki-ajax_services.php', dataType: 'json', data: { controller: 'tracker', action: 'update_item', trackerId: 11, itemId: $(el).val(), ins_320: 1 } }); }); }); }); $('#user_selector_229').closest('.form-group').hide(); $('#trackerinput_143').closest('.form-group').hide(); {JQ} {CODE} This way, as in the previous case, some ((PluginListExecute)) can filter these "unprocessed" values and run some action on them, plus reset the status flag to 2 (processed), etc. So that permissions based on the user selector field can be set in synchrony among trackers. !!!# Make a clickable button with a custom icon For when using ((PluginButton)) isnt possible for whatever reason. {CODE(caption="Code" colors="javascript")} {DIV(class="my-button btn btn-primary")}{icon name="add"}[my-hyperlink|Click me!]{DIV} {JQ()} $('div.my-button').click(function(){ window.location.href=$(this).find('a').attr('href'); }); {JQ} {CODE} In the example above, we want the div to act as the button but the hyperlink is only on the 'click me' text. By adding a click event on the div, you can fetch the hyperlink which now make the whole div clickable. !!!# Allow only lower case letters in a tracker field In this example we want to allow the user to type only lowercase, so that we replace the typed letters to lowercase at typing time, in the search form produced by ((PluginCustomSearch)): {CODE(caption="Code" colors="javascript")} {JQ()} $("#customsearch_0_24").on('keyup', function(e){ if( e.keyCode >= 65 && e.keyCode <= 90 ) { $(this).val($(this).val().toLowerCase()); } }); {JQ} {CODE} Replace -+customsearch_0_24+- with the right value for your field selector. This is useful with search/folter boxes (from ((PluginCustomSearch)), ((PluginTrackerFilter)) or similar use cases with filter fields) in which the stored content or text strings are in lowercase, and the search is case sensitive, so that searching the uppercase versions of the string will show no matches. !!# jQuery on Custom Search results If you want to run some jquery code on the results of the ((CustomSearch)), you need to do it in a different way than usual, since Custom Search loads results by Ajax and doesn't allow to run javascript code by default. See param "__callbackscript__" at the ((CustomSearch)) documentation page to see how to avoid this issue and get your jQuery run. !!# Tracker Field Validation See also: ((Tracker Field Validation)) > __Adding custom per-page validation__ !! More jQuery tips & tricks For more tips and tricks using jQuery, visit: http://api.jquery.com/ For more information on jQuery selectors: http://api.jquery.com/category/selectors/