In scp\js\scp.js I've found the following code...It seems like this is what adds the fields...but I can't get it to work if this is indeed the right code.
/* Typeahead user lookup */
$('#email.typeahead').typeahead({
source: function (typeahead, query) {
if(query.length > 2) {
$.ajax({
url: "ajax.php/users?q="+query,
dataType: 'json',
success: function (data) {
typeahead.process(data);
}
});
}
},
onselect: function (obj) {
var fObj=$('#email.typeahead').closest('form');
if(obj.name)
$('#name', fObj).val(obj.name);
},
property: "email"
});
Update:
By removing the onselect if(obj.name) statement from above, It no longer injects the name!! We are close! Once I figure this stupid thing out, I will make an official Post in the 1.7 MOD area.
SUCCESS
Well i guess persistance pays off :)
/* Typeahead user lookup */
$('#email.typeahead').typeahead({
source: function (typeahead, query) {
if(query.length > 2) {
$.ajax({
url: "ajax.php/users?q="+query,
dataType: 'json',
success: function (data) {
typeahead.process(data);
}
});
}
},
onselect: function (obj) {
var fObj=$('#email.typeahead').closest('form');
if(obj.name)
$('#name', fObj).val(obj.name);
if(obj.pcname)
$('#pcname', fObj).val(obj.pcname);
if(obj.phone)
$('#phone', fObj).val(obj.phone);
},
I've Made a proper MOD thread for this @ (http://osticket.com/forums/showthread.php?t=14267)