Hello,
Is it possible to use the same button to reset two input text fields with different names?
I have a calculator one with the amount and the other one with the sale taxes, is possible to reset both input fields to zero? I can do it to one.
Hello,
Is it possible to use the same button to reset two input text fields with different names?
I have a calculator one with the amount and the other one with the sale taxes, is possible to reset both input fields to zero? I can do it to one.
Hi @angellara Welcome back to the forum!
Here's a snippet you can try:
Enter the price of the item: {formtext: name=price; default=0}
Enter the sales tax rate (as a percentage): {formtext: name=tax_rate; default=0}
{if: isnumber(price) and isnumber(tax_rate)}
Sales tax amount: {=price * tax_rate / 100; format=$,.2f}
Total price including tax: {=price + (price * tax_rate / 100); format=$,.2f}
{else}
{error: Please enter valid numbers for both the price and the tax rate}
{endif}
{button:
price=0
tax_rate=0; label=Reset all}
Let us know if it works for you.
@Gaurang_Tandon Thank you creating this, this worked perfectly!