• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Forcing Recalculation Via Javascript

Forcing Recalculation Via Javascript 7 years 10 months ago #37043

  • eagleitg
  • eagleitg's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
I'm making changes to my form via Javascript, some of these changes involve setting, say, a dropdown selection based on the selection of something else and that dropdown utilizes the [p] tags to calculate. The problem is that when I force a drop down to be a new valid value it won't recalculate the form, the calculated field stays the same until I click the drop down, select something else and then select what the JS code selected for me.

Is there a function I can call that will force a recalculation of the calculated fields?

Thank you!
The administrator has disabled public write access.

Forcing Recalculation Via Javascript 7 years 10 months ago #37047

  • adrianp
  • adrianp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 631
  • Thank you received: 146
Hello,

Since the selection isn't normally made by a user and directly through JavaScript, you'll indeed require to also re-trigger the according function, which can be done as follows (whereas XX is your exact form ID - found via backend > Components > RSForm!Pro > Manage Forms > notice last column):

- for the automatic price calculation when using the payment related form elements:
getPrice_XX();

- when using the built-in calculation feature:
rsfp_CalculationsXX();

- and for conditional fields:
rsfp_runAllConditionsXX();
This is not official customer support. To receive your support, submit a support ticket here.
The administrator has disabled public write access.
The following user(s) said Thank You: rakeshy, eagleitg, m.pradel
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!