We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31255
    • 118 Posts
    Situation is that I want calculate value from tv (price) multiplyed with selected value of form.
    tv=*A4-kalenteri-hinta
    And here`s form:
    <select name="A4">
    <option value="0" [[!+fi.A4:FormItIsSelected=`0`]] >Select</option>
    <option value="1" [[!+fi.A4:FormItIsSelected=`1`]] >1 kpl</option>
    <option value="2" [[!+fi.A4:FormItIsSelected=`2`]] >2 kpl</option>
    <option value="3" [[!+fi.A4:FormItIsSelected=`3`]] >3 kpl</option>
    <option value="4" [[!+fi.A4:FormItIsSelected=`4`]] >4 kpl</option>
    <option value="5" [[!+fi.A4:FormItIsSelected=`5`]] >5 kpl</option>
    <option value="6" [[!+fi.A4:FormItIsSelected=`6`]] >6 kpl</option>
    <option value="7" [[!+fi.A4:FormItIsSelected=`7`]] >7 kpl</option>
    <option value="8" [[!+fi.A4:FormItIsSelected=`8`]]>8 kpl</option>
    <option value="9" [[!+fi.A4:FormItIsSelected=`9`]] >9 kpl</option>
    <option value="10" [[!+fi.A4:FormItIsSelected=`10`]]>10 kpl</option>
    </select>


    How to do that? And it would be great to include postal cost too there, would it be like tv postalcost, and how to add that value to results.

    And of course it shold show 0 price when value is 0 (default?). Maybe input/output modifiers, but I`m total lost with it.

    All that rendered on the fly to page bottom of form select. [ed. note: valokammi last edited this post 10 years, 11 months ago.]
      Tassu, webmaster of Valokammi
      • 31255
      • 118 Posts
      EDIT: I changed tv name above post to match what I`m doing.

      This is what I made so far. It renders 0 for result, but nothing happens when change selection. Is it even possible to change that value dynamically without javascript?

      [[!+A4:is=`0`:then=`0`:else=`[[*A4-kalenteri-hinta]]`:mpy=`[[+A4]]`]]


      Uncaching that was just a tryout, no change.
        Tassu, webmaster of Valokammi