• First of all thank you for the wonderful plugin.

    So I am creating this form which needs some calculation and some read-only text areas or labels.

    So when a user input “2” in a text-box then in the read-only text box it should display the price for for 2. (eg: $220). Then i also need to display the total for the form submitter.

    Is it possible to achieve this?
    __________
    Bage

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author hoffcamp

    (@hoffcamp)

    If you are decent with JavaScript, you could put some script into a note, with a blank label and the HTML box checked. So if your first item has the nickname ‘item1’, and the second has the nickname ‘item2’ (which you set in the Item Meta tab), this would do what you are talking about:

    <script>
    window.onload = function() {
    var item1 = fm_get_form_item('item1');
    var item2 = fm_get_form_item('item2');
    
    item2.disabled = true;
    
    item1.onchange = function() {
       if(item1.value.match(/\d+/)){
          item2.value = ( item1.value * 110 );
          item2.value = "$" + item2.value;
       }
    }
    }
    </script>
    Thread Starter Bage

    (@bagerathan)

    Thank you for the answer. I will give a try.

    Bage.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘question or an Idea’ is closed to new replies.