This isn't really a ChronoForms specific question, but since I'm using ChronoForms to do the forms I thought I'd ask it here first (and besides, there are probably some ChronoForms specific things I could do to accomplish what I'm after).
I want to create a form that includes some dynamic content, and I suspect that javascript/AJAX is the way to go - but I don't know how to do it.
There are four fields, two of which will be user determined, and the other two will be calculated based on what the user puts in the first two.
Field1 -> user input (dollar amount)
Field2 -> user input (dollar amount)
Field3 -> calculated -> (Field1 - Field2) with a max value of 500 - i.e., if(Field1 - Field2) > 500, then Field3 = 500, else Field3 = (Field1 - Field2)
Field4 -> calculated -> Field4 = Field1 - (Field2 + Field3)
So, what I'd like is for Field3 and Field4 to automatically adjust based on the calculated values whenever a value is changed in Field1 or Field2.
Any ideas on how to best accomplish this?
Thanks,
Scott
I want to create a form that includes some dynamic content, and I suspect that javascript/AJAX is the way to go - but I don't know how to do it.
There are four fields, two of which will be user determined, and the other two will be calculated based on what the user puts in the first two.
Field1 -> user input (dollar amount)
Field2 -> user input (dollar amount)
Field3 -> calculated -> (Field1 - Field2) with a max value of 500 - i.e., if(Field1 - Field2) > 500, then Field3 = 500, else Field3 = (Field1 - Field2)
Field4 -> calculated -> Field4 = Field1 - (Field2 + Field3)
So, what I'd like is for Field3 and Field4 to automatically adjust based on the calculated values whenever a value is changed in Field1 or Field2.
Any ideas on how to best accomplish this?
Thanks,
Scott