Contact Form 7
Contact Form 7 - Can I calculate the difference between 2 fields (3 posts)

  1. fhecksher
    Posted 5 years ago #

    I'm completely new to WordPress and plugins, so please forgive me if this has been answered somewhere else.

    I'm using contact form 7 as a booking facility and have also activated the Contact Form 7 Calendar plugin to add date pickers (arrival and departure dates).

    Is it possible to create a field that adds the number of days or nights between the two dates?

    Many thanks


  2. silvercrow
    Posted 5 years ago #

    I dont know about a plugin but you can do that with javascript

    with something like this
    function calc(form) {
    c = form.a.value+form.b.value;
    form.c.value = c;

  3. fhecksher
    Posted 5 years ago #

    :) Thanks! Where would I put that code?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic