Hi Evan,
Here is an example:
First, make sure the drop-down field choices/values all start with currency code as shown in field options (like "USD - US Dollar($)"). This will be used to find choice symbol. Add CSS class "currencyFormat" to the drop-down field.
Then, apply the following script
$(document).ready(function(){
var currencyFormat = '';
//When currency format is changed, update currency fields
$('.currencyFormat select').change(function(){
currencyFormat = $('.currencyFormat select').val().substring(0,3);
UpdateCurrency();
});
//If form is read only, get currency format from text and update fields
if ($('.currencyFormat .ro')) {
currencyFormat = $('.currencyFormat .ro').text().substring(0,3);
UpdateCurrency();
}
function UpdateCurrency()
{
if (currencyFormat) {
$('input.currency').attr('currencyformat', currencyFormat);
//Update field symbol
$('span.margin-end').each(function () {
currency = _.find(currency_list, { 'code': currencyFormat});
$(this).text(currency['symbol']);
});
}
}
})
p.s. I tried to update currency decimal place as well but it didn't work as expected. So currency decimal place could not be changed with above code.