• Payment Plugins Poll

    We need your feedback on the need for updated payment plugins. Please go here and give us your feedback.

  • Joomla 5.1

    For running J!5.1 you must install Fabrik 4.1
    See also Announcements

  • Subscription and download (Fabrik 4.1 for J!4.2+ and J!5.1) are working now

    See Announcement
    Please post subscription questions and issues here

    We have resolved the issue with the J! updater and this will be fixed in the next release.

Setting one date depending on an other

  • Views Views: 2,667
  • Last updated Last updated:
  • Date element's Javascript:
    Select "Event" = change
    In "Javascript code" field add
    Code:
    /*On change of from_date (=this element) set to_date  2 days after.
    termin_reservation___bis = full element name of to_date, form_18 = your form id
    */
    var to_date_id = 'termin_reservation___bis';
    var to_date = Fabrik.getBlock('form_18').formElements.get(to_date_id);
    var from_date = this.get('value');
    var newDate = new Date(from_date);
    newDate.increment('day', 2);
    to_date.set(newDate);
Back
Top