A really simply question. I have six fields all numeric on my form. I want to create a 7th field that is the sum of all of those six that dynamically updates as and when any of those 6 fields are changed.
How do i do that in Confiforms??
Hi
Add a Formula type field to your form definition and set the formula expression
([entry.field1] + [entry.field2])
If they are non compulsory then do something like this
(ZEROIFEMPTY("[entry.field1]") + ZEROIFEMPTY("[entry.field2]"))
More on formulas in ConfiForms could be found here
Alex
I have tried this already
Setting a Confiform field definition to formula, and in the expression section trying both of the methods you described.
and nothing happens when the fields are updated on the form. The formula field just stays blank.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, slight update, when I use the ZEROIFEMPTY in does provide a total but only when the record is saved NOT as the values in the fields are updated. What I want is to have the form show the total as people enter data in the fields so that it dynamically updates as each field is updated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Fields are updated when you submit the form
But please have a look at these examples
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh good God no way. I don't want to have to write macros to sum to fields together so that they update dynamically on the form, that's WAAAAAYYYYYYY too much trouble. Thanks all the same.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What do you mean "write macros"!? I dont quite understand...
Here is a screencast - just configure the field definition rule to set calculate the value for the field you want, adding it to changes in the fields that you want to track
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What you just said doesn't make sense to me. I already have set the field to formula, but it only updates when the record is saved. That's no use to me and I don't see any settings that allow me to change that.
The screencast shows the result but is not a "how to walkthrough" of how to set the form up todo that. It talks about importing code (which I am not going to do) using the confiform source editor.
If there's a simplier way, great, talk to me like a confiform newbie so I understand what you mean.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The page has a storage format that you can import and see what it does (and cloud version of ConfiForms has this built-in)... It is the easiest and only way to share configurations
I have also created a simple screencast for you to illustrate how the configurations looks in the editor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I appreciate you are trying to help, but asking me to import a page so I can how the example you've provided works is as good as asking me to fly a space rocket to the moon, on a friday, during rush hour, with my eyes closed or to guess the next winning lottery numbers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nope, tried importing the source code onto a blank page and get an error, so as much as I would like to follow the example you gave seems its impossible.
Shame there isnt a straight forward guide that shows you step by step how to do it.
Anyway, I've given up. Seems there are some things Confiform is good for, but simply adding to fields togethere isn't one of them. I will have to live with the "calculate on save" for now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have recorded you a screencast - is it also hard to follow? There is literally one “set value” rule to add to your form
How more detailed this should be? I am just trying to improve and “fix” what’s broken
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried everything you suggested. And while it all worked on screen and calculated as number were entered and the record saved. When it was brought back up to edit all the totals were wrong. I have no idea why, as all seemed fine. I had to to change one field in the formula to correct the totals and saved again. Clearly there's more to this in terms of field types (for example I used the same as you, READONLY) that need to be explored, but the form is already in use and I can't keep changing it as then I have to go back and edit all submitted records to correct them.
Anyway, I am sticking with calculate on save, it's not perfect but at least its accurate.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.