Hi everyone! I have a question about lookup fields.
In my project I have a table 'people' with this fields:
- Name (varchar)
- Surname (varchar)
- Active (varchar / checkbox)
I am using all fields in another table 'place':
- Place (varchar)
- Name (lookup field)
- Surname (lookup field)
- Active (lookup field)
And now the field "Active" in the table 'place' is printed as a number (1 - checked, 0 -unchecked). Is it possible to have this lookup field printed as a checkbox as in the "source" table?
Thanks in advance!
Print a lookup field as a check
Re: Print a lookup field as a check
Hi,
you can try to add to your hooks/place-tv.js file:
you can try to add to your hooks/place-tv.js file:
Code: Select all
$j(function() {
$j('.place-Active:contains(1)').find('a').text('').append('<i class="glyphicon glyphicon-check"></i>');
$j('.place-Active:contains(0)').find('a').text('').append('<i class="glyphicon glyphicon-unchecked"></i>');
})
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.