Formidable Forms

Formidable Forms

  • Features
  • Pricing
  • Resources
    • Docs & Support
    • Blog
    • Community
  • Solutions
    • Web Applications
    • Calculators
    • Surveys
    • Directories
    • Payments
    • Contact forms
  • Login
  • Get Formidable Forms

Time

Last Updated: March 23, 2021

Knowledge Base → Forms → Form Building → Field Types → Time

— Premium Feature —

The Time field is used to select a time from a dropdown field. The start and end time can be adjusted as well as the minutes between each time option.
Time Field

Formidable Forms is the best WordPress Form Builder plugin. Get it for free!

Standard field options

Time fields have the following standard options:
Time Field OptionsTime Field Options

  • Field Type
  • Required
  • Unique
  • Field Key
  • CSS Layout Classes
  • Label position
  • Field Size
  • Visibility
  • Conditional logic
  • Dynamic default value
  • Lookup value

Field-specific options

In addition to the standard field options, Time fields have a 'Clock Settings' option.

Clock Settings

Choose between a 12 and 24 hour clock, set the minute step, and select the start and end time for your Time field.

In Formidable Forms v2.03 and later, the time field will appear in the form with three dropdown fields: hours, minutes, and AM/PM. You can check the box for show a single time dropdown to show the time field in a single dropdown instead.
Time Clock Settings

Default values and field icons

Set a dynamic default value in your Time field. If you would like to retrieve a value from an entry see the Get a Value From an Entry page. If you would like to set a default value, see the Default Values page.

Field action icons allows you to duplicate, delete, and/or move a field on the form builder page. See field action icons for more information.

Set default to the current time

Autopopulate a Time field with the current time by following the steps below.
Time Field Current Time Default

  1. Set the clock settings step to 1 (min).
  2. Select the time format that you want to use for the current time.
  3. In your Time field Default value setting, insert the [time] shortcode. Depending on your selected Time Format, use one of these two default values:
    • [time format='H:i'] - 13:09 - Use with 24 hour clock time format.
    • [time format='g:i A'] - 1:09 PM - Use with 12 hour clock time format.

If you would like to round the value to the nearest 30 minutes and use a 30 minute step, use the following shortcode.

[time format='g:i A' round=30]

Display Time fields

Display the value submitted in a Time field in a form's confirmation message, email, or View.

Shortcode options

  • Display value: Display the value submitted in a Time field.

    [x]

    Replace x with the ID or key of the Time field.

  • Time Format: Change the format of the displayed time.
    • Display as a 24-hr clock format, e.g. 18:30.

      [x format='H:i']
    • Display with a lower case am/pm like 6:30 pm

      [x format='g:i a']
    • Replace x with the ID or key of the Time field.

      For more format options click here, scroll down to the parameter section and look under 'Time'.

Limit form to one time slot per day

One of the most common scenario is a booking form. In the case where you want your users to book a time slot on different days, you can use the approach below.

  1. Add a Date field to your form.
  2. Add a Time field and mark it as unique. Set it to show a single time dropdown.
    Time Field Single Time Dropdown

When a user fills out the form with a date and a time, that time slot would be unique and can only be selected by one user. When another user fills out the form, the previously selected time slot will be disabled and greyed out.
Time Field Limit Time Slot Date

Calculate time difference

If you want to calculate the difference between two time fields, use this code example.

Related developer hooks

  • Black out time blocks with the frm_allowed_times snippet.
  • Calculate total time with the frm_validate_field_entry snippet.
  • Calculate total time inside a repeater with the frm_validate_field_entry snippet.
  • Standard field options
  • Field-specific options
    • Clock Settings
  • Default values and field icons
    • Set default to the current time
  • Display Time fields
    • Shortcode options
  • Limit form to one time slot per day
  • Calculate time difference
  • Related developer hooks
Categories
×

Categories

  • Installation & Getting Started
  • Account Management
  • Forms
  • Entries
  • Views
  • Styles
  • Importing & Exporting
  • Add-Ons
  • Extend Formidable Forms

Using WordPress and want to get Formidable Forms for free?

Get Formidable Forms Lite Now

You do not have permission to view this form. Maybe you need to log in?

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

Take on bigger projects Right Now

Get the tools you need to revolutionize your workflow and architect a masterpiece. Build the most advanced WordPress forms and actually use the data you collect in meaningful ways.

Get the most advanced WordPress form plugin and the only form builder with integrated Views.

Get Formidable Forms Now

Resources

  • Community
  • Affiliates
  • Contact
  • Free Online Form Builder

Top Features

  • Application Builder
  • Calculator Forms
  • Surveys & Polls
  • Quiz Maker
  • Form Templates
  • Application Templates
  • Directories
  • Donation Plugin

Company

  • About Us
  • Giving Back
  • Careers
  • Newsletter
  • WP Tasty
  • Nutrifox

Copyright © 2023 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.
Privacy Policy | Terms of Service | Sitemap

Join 300,000+ using Formidable Forms to create form-focused solutions fast. Get Started See User Reviews