Tell us what you are trying to do?
On this page: hidden link
look at the Key Tenants Section the custom fields do not have a space after the comma.
Aldi Foods,Jo-Ann Fabric and Craft,Rooms and Rest
I would likethem to have a space
Aldi Foods, Jo-Ann Fabric and Craft, Rooms and Rest
Should the link on the dev site not display here is the live site
hidden link
We are using toolset.
I can provide ftp or the code if needed.
Thanks! -- Steven
Hi, can you share the code that displays the custom field values? I'll review the syntax and let you know what we can do. Thanks!
Thanks! for the reply
I think it might be related to this line in
jQuery('select[name=major-tenants] option:gt(0)').remove();
Here is the file
hidden link
It is around line 7664
function formatDropdowns(summary) {
// make everything unique
;
['states', 'manager', 'major-tenants', 'agent'].forEach(function (k) {
summary[k] = Array.from(new Set(summary[k].filter(Boolean)));
});
summary['states'].sort();
summary['manager'].sort();
summary['major-tenants'].sort();
summary['agent'].sort();
jQuery('select[name=state] option:gt(0)').remove();
jQuery('select[name=manager] option:gt(0)').remove();
// jQuery('select[name=major-tenants] option:gt(0)').remove();
jQuery('select[name=major-tenants] option:gt(0)').remove().append("XXX");
jQuery('select[name=agent] option:gt(0)').remove();
jQuery.each(summary['states'], function (key, value) {
jQuery('select[name=state]').append(jQuery('<option></option>').attr('value', value).text(value));
});
jQuery.each(summary['manager'], function (key, value) {
jQuery('select[name=manager]').append(jQuery('<option></option>').attr('value', value).text(value));
});
jQuery.each(summary['agent'], function (key, value) {
jQuery('select[name=agent]').append(jQuery('<option></option>').attr('value', value).text(value));
});
jQuery.each(summary['major-tenants'], function (key, value) {
jQuery('select[name=major-tenants]').append(jQuery('<option></option>').attr('value', value).text(value));
});
}
Around Line 7611 there is this function
function styleTable(data) {
var tr = "<tr class='result'><td>' + data.name + '';
tr += parseInt(data.sqft) > 0 ? " <span style='color:#161616;'>(" + data.sqft + ' Sq. Ft.)</span>' : '';
tr += '<br />' + data.address + '</td>';
tr += '<td>' + data['sqft-available'] + ' Sq. Ft.<br />';
tr += data['num-available'] + '/' + data.units + ' Spaces</td><td style="text-align:center;">';
tr += data.outlot ? "<i style='color:#ccc;' class='icon-ok'></td>" : '</td>';
tr += '<td>' + data['major-tenants'] + '</td></tr>';
jQuery('#search-results').append(tr);
jQuery('#search-results').show();
}
I think the line
tr += '<td>' + data['major-tenants'] + '</td></tr>';
is outputting the information for the Key Tenants column in the table on
hidden link
I am not sure where the information for data['major-tenants'] file is coming from
my first reply the talks about the dropdown summary was in the wrong place in the file.
This seems to be custom JavaScript code written for use with Leaflet maps, and it's not supported by Toolset. With that being said, you can format the output of a JavaScript array using the JavaScript "join" function. I'm not sure if you can assume data['major-tenants'] will always be an array though. Do you know? If not, I strongly recommend asking whoever developed this custom code to provide a foolproof way to reformat the text shown here.