Currency format in custom calculation script
I have a long custom calculation script that combines 23 fields. Below is a small portion of the results and a small portion of the script I’m using. I have been successful with value.toFixed(2) to shorten to 2 decimal places. I’ve been successful with the line splits using \n.
Now, I am trying to format the dollar amounts with a comma separating thousands and hundreds if applicable.
Any assistance would be helpful!
Portion of script:
event.value = "Traveler 1 Name: " + this.getField("Traveler1Name").value + "\nConference Registration $ " + this.getField("ConfRegFeeT1").value.toFixed(2) +
"\nLodging $ " + this.getField("HotelCostT1").value.toFixed(2) + " X " + this.getField("HotelNightsT1").value.toFixed(2) + " = $ " + this.getField("HotelTotalT1").value. toFixed(2) +
"\nMeals: Breakfast $ " + this.getField("BreakfastCostT1").value.toFixed(2) + " X " + this.getField("BreakfastDaysT1").value.toFixed(2) + " = $ " + this.getField("BreakfastTotalT1").value.toFixed(2) +
"\nMeals: Dinner $ " + this.getField("DinnerCostT1").value.toFixed(2) + " X " + this.getField("DinnerDaysT1").value.toFixed(2) + " = $ " + this.getField("DinnerTotalT1").value.toFixed(2)
Results:

Any assistance would be helpful!
THANKS!
