• Hello Michael,
    first of all, thank you very much for this great plugin.

    I need to multiply data from a form. As far as I found out, some options I have are:

    – send to a google sheet, then bring it back to my wordpress site (with another plugin). Guess I can do it, and it seems to be easy. Cons are, from my very personal perspective, (1) increasing the amount of stuff google knows about me (the data is absolutely not critical, it’s just my silly mania of avoiding depending on huge companies as far as I can) and (2) the fact that data will be travelling much more than if staying in my wordpress. Actually, there seems to be an issue with google sheets refresh time, though I’m not sure;

    – using the HTML <output> tag. Major con is browser support – I haven’t actually studied it to know if it can fulfill my needs;

    – php stuff. Beyond my knowledge;

    – trans bcmul (yes, it’s php, but hopefully achievable for a non-programmer, with cfdb). The last update says it’s now allowing math functions in “trans”. Sorry if I’m too anxious, but is it now easier to use it? Can I use it with [cfdb-value]?

    What I’d like to do would be to sum up the values from a field, then to multiply it for a certain number, getting a field result. Then, I wanna sum up the results from all fields.

    I’m actually a designer, with little knowledge on programming – I can only handle with some certainty html and css.

    Anyway, thank you very much for your great work.

    https://wordpress.org/plugins/contact-form-7-to-database-extension/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    Would you give some example data (make it up) and the calculations you are trying to do?

    Thread Starter Theo

    (@dubeux)

    I’m a member of a CSA – a group commited to support organic farmers, directly buying their products. We have to manage weekly orders of a number of products, from 50 families.
    I’m trying to automate this process, so I made this form (sorry, it’s in portuguese – I’m brazilian), where each line is a product (a field). It sends the data to this cfdb table, where each submitted form (each family order) is a line, and columns are the products.
    What I’d like to do:

    – to sum up values from each column, getting the total amount of each product. I was able to do it with [cfdb-value], though not as another table row, below the orders, but in a separate table;

    – to multiply each column result by its price, obtaining the amount of money the farmer must receive (for each product);

    – on each line, to multiply each number (which is, naturally, a [number] input) by its price, then sum them up, obtaining each family’s order total;

    – finally, to sum up all lines results, getting the total to be paid.

    As you can see, it’s a typical job for a spreadsheet. I’m just not sure what’s the best way to achieve that in wordpress.
    Thank you anyway, for your kind attention.

    Plugin Author Michael Simpson

    (@msimpson)

    Get the latest update 2.9.4 that I am releasing today.

    Try something like this in your short code (I’m only using 2 fields here)

    trans="ovos total=multiply(ovos,8)&&morangocb total=multiply(morango,4)&&total=sum(ovos total,morangocb total)&&FieldTotal(ovos,morangocb,ovos total,morango total,total)"

    Thread Starter Theo

    (@dubeux)

    I’ll try to do it, but first of all, just wanted to say thank you very much, for being so helpful – for me and so many others.
    All the best.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘multiply form data’ is closed to new replies.