Client Side Events... Conditional Calculation?
Last Post 10-29-2012 04:06 AM by Ryan Bakerink. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
Jon MorrissetteUser is Offline
going with the flow
going with the flow
Posts:34
Avatar

--
10-28-2012 07:49 PM
    I have a client-side event that calculates an order total using the functRadioCalc function.  It calculates an event cost, and then adds/subtracts whatever discounts a customer wants.

    Now, my client wants to add a "deposit-only" checkbox field on the form that overrides the calculated order total. 

    >> If checked, they would only pay $200
    >> If unchecked, it would calculate the order total and proceed

    The new "checkbox field is called "DepositOnly".  If checked, it would change the "ordertotal" field to $200; if false, it would recalculate the form and use the higher amount.

    Here is my current ordertotal routine:

    $(OrderTotal) = funcRadioCalc($(SelectedEvent_FieldID))-CalculateCheckBoxListValues($(AvailableDiscounts_FieldID), $(AvailableDiscounts_ValueFieldID))

    Any ideas?
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    10-29-2012 04:06 AM
    Hello Jon,

    I would recommend building a snippet of JavaScript that evaluates all fields on the form that affect the calculation. Perform the correct calculations at the right conditions, in a top to bottom manner.

    After accumulating all of your conditional calculating JavaScript you'll want to copy/paste it in the following areas:

    * Module Configuration -> Advanced Coding Options -> Custom JavaScript File -> Initial JavaScript
    * The "On Client Side" event textarea box for each field that is associated with the calculations. This section can be found under Advanced Question Options for that Question.

    Please let me know if you have any questions.

    Thanks,

    Ryan


    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi