stephenmcd/django-forms-builder — pull request #54 by mhebrank (2012-04-06 16:35:22+00:00)
Title: Formulas

Ok. This is step 1 of adding formula fields to the builder. This allows basic formulas to be entered and calculated both on the page via javascript and then upon saving. (eg: Having a Total field that adds together other fields that can be formulas themselves.)

Additional changes:

Changed the number field to be "Number with decimal" and added a "Number w/o decimal" type.
A "readonly" attribute to fields, in case the creator doesn't want the formula field (or a prefilled field, I guess) to be edittable.
The ability to have value;label in the choices field in case the creator wants the formula to be based on checkboxes or select fields. (eg: choices: 1;One person,2;Two people,3;Three people,4;Four people)

I don't think this is completely ready for prime time, as I haven't added the admin tools to make it work nicely(right now, you need post processed form field names in the formula: "field_1+field_2"), nor am I 100% sure that the formula calculations will always work correctly. But it's working for my testing so I think it's worth throwing in a separate branch to see if anyone else wants to work on it too.