By NAlvarado - Wed Jun 20, 2018 6:59 pm
- Wed Jun 20, 2018 6:59 pm
#814848
I am having an issue with summing the values in a grid in Form 1, formatting it to have a comma and then transferring it to Form 2. It's a little lengthy but I hope I conveyed my issue.
Form 1 contains a grid where a user can input the amount. The user wants the amount to display as 1,2345.21 (formatted with comma and decimal). Javascript exists to format the amount upon changing the form. The total appears in a separate field as the user wants Total to appear instead of the sum symbol. In order to sum the amounts, I format the amount for the Amount field, then un-format and place the number in a hidden field within the grid. I then sum the hidden fields, and format that to become the Total.
The problem is that when Form 2 is opened, even though the Total and Amount looks like the variable in Form 1 (1,2345.21), upon changing a drop down value, the Total re-sums itself with a new value, in this example 1 (it drops everything after the comma). Form 1 contains javascript to do the sum and format the numbers but Form 2 only contains javascript to show or hide fields depending on one of the other variables (Type - not associated with the amount/total).
I thought the variable value if used across multiple forms comes across with the same value. So why is the total changing when there is an update to the form 2? Thanks for the help.
Form 1 contains a grid where a user can input the amount. The user wants the amount to display as 1,2345.21 (formatted with comma and decimal). Javascript exists to format the amount upon changing the form. The total appears in a separate field as the user wants Total to appear instead of the sum symbol. In order to sum the amounts, I format the amount for the Amount field, then un-format and place the number in a hidden field within the grid. I then sum the hidden fields, and format that to become the Total.
The problem is that when Form 2 is opened, even though the Total and Amount looks like the variable in Form 1 (1,2345.21), upon changing a drop down value, the Total re-sums itself with a new value, in this example 1 (it drops everything after the comma). Form 1 contains javascript to do the sum and format the numbers but Form 2 only contains javascript to show or hide fields depending on one of the other variables (Type - not associated with the amount/total).
I thought the variable value if used across multiple forms comes across with the same value. So why is the total changing when there is an update to the form 2? Thanks for the help.