I was trying to use some JavaScript like this...
$(document).ready(function() { $('.resides').on('change', 'input', changeWord); function changeWord () { if ($(this).val() == 'B') { $(this).val('Both'); } if ($(this).val() == 'S') { $(this).val('Shared'); } } });
to change the letter B to the word Both and the Letter S to the word Shared etc. This doesn't work though. What have I missed?
The fields are in a Collection
I had this JavaScript (from a previous question)..
https://answers.laserfiche.com/questions/128190/Changing-a-field-value-from-B-to-Both
$(document).ready(function() { $(document).on('lookupcomplete', function(event){ if ($('.resides input').val() == 'B') { $('.resides input').val('Both'); } else { $('.resides input').val('None'); } }); });
but this only changed the values in the first instance of the Collection.
Any help will be greatly appreciated.
Jonathan