by Razor12345 April 10th 2023, 8:00 pm
Good evening!
I can offer two solutions to the issue:
1) You can use the standard field 'HOBBIES'
AP - Users & Groups - Profiles - Profile fields - Here you can rename the field, e.g., 'Some field'
AP - Display - Templates - General - memberlist_bodyFind:
- Code:
<th class="interests">{L_INTERESTS}</th>
Replace with:
- Code:
<th class="interests">Some field</th>
Save. Publish.
Result:
2) Use the data upload I suggested in a neighboring thread:
https://help.forumotion.com/t162228-about-the-contact-column#1137323AP - Users & Groups - Profiles - Profile fields - Green plusCreate a new field, e.g. "Status"
Display - Profile and Messages
AP - Display - Templates - General - memberlist_bodyFind:
- Code:
<th class="interests">{L_INTERESTS}</th>
Replace with:
- Code:
<th class="interests">Status</th>
Find:
- Code:
<td>{memberrow.INTERESTS}</td>
Replace with:
- Code:
<td><div class='res'></div></td>
At the end of the template, insert this code:
- Code:
<script>
window.addEventListener('load', function() {
let aaa = document.querySelectorAll('a.tooltipstered');
let bbb = document.querySelectorAll('td div.res');
aaa.forEach(function(item, index) {
let adr = item.href;
$.ajax({
url: adr,
method: "GET",
data: 'dl#field_id1',
dataType: "html",
success: function (data) {
let div = document.createElement('div');
div.innerHTML = data;
let find_el = div.querySelector('dl#field_id1');
bbb[index].append(find_el);
}
})
})
});
</script>
dl#field_
id1 - the id depends on the number of fields created. If you know how to use the developer tools, you can check the field id yourself. If not, send me the username and password for a regular user account.
Save. Publish.
AP - Display - Colors & CSS - CSS Stylesheet - Code:
div.res dl#field_id1 dt {
display: none;
}
Save.
Result:
The styling of the profile field is already up to you