TOPIC:

Date Picker action script/Script on date change? 5 months 2 hours ago #257779

  • Topic Author
  • jdwires
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 14
  • Thanks: 0
I need to run a javascript function after a responsive calendar date picker is used to calculate a total. The validation script only runs on submit, so that won't work. The jquery change() function only is triggered when the change to the input is made by the user so I can't just add an event listener on the input field, so that is also no good. I could have a "calculate total" button to run the script, but that seems like poor UX.

I have some other elements that have action scripts to run my calculation function located after the date pickers, but if the user goes back and changes the date, no recalculation... :(

Any other ideas for triggering a script to run once a date is selected?

Please Log in or Create an account to join the conversation.

Date Picker action script/Script on date change? 5 months 2 hours ago #257783

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6916
  • Karma: 3
  • Thanks: 492
Hi,

I am not sure that I understood you correctly:
1) are you using element responsive calendar and set this in Before form pieces?
2) you have a fields for calculate, and when someone select date you want to be able to calculate, otherwise not?

Sorry if I missundestood you

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Date Picker action script/Script on date change? 5 months 1 hour ago #257787

  • Topic Author
  • jdwires
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 14
  • Thanks: 0
Tihana,
Thanks for the reply. Answeres below.

1) are you using element responsive calendar and set this in Before form pieces?


Responsive calendar element, yes. Right now, the function has been inserted after another element's action script code framework for simplicity but could be moved to the before form pieces.

2) you have a fields for calculate, and when someone select date you want to be able to calculate, otherwise not?


There are 4 fields that are part of the calculation:

check-in date (responsive calendar)
check-out date (responsive calendar)
question (select from list)
another question (select from list)

I would like to run the script when any one of the four elements are changed. Right now, it only works when the two select from list elements are changed. Hope that is more clear.

Thanks in advance for the help.

Please Log in or Create an account to join the conversation.

Date Picker action script/Script on date change? 4 months 4 weeks ago #257806

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6916
  • Karma: 3
  • Thanks: 492
Hi,

ok, understand. This is because list has a values for calculation, and this can't be done in responisive calendar (on change, because we can't use action script in responsive calendar).

Those lists have some values, and on change they run calculation script.

I hope I didn't miss something

Regards,
Tihana

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.046 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!