WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. fhecksher
    Member
    Posted 3 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

    http://wordpress.org/extend/plugins/contact-form-7/

  2. silvercrow
    Member
    Posted 3 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
    Member
    Posted 3 years ago #

    :) Thanks! Where would I put that code?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic