Booking 24 hours ahead of time
This WordPress form will only allow bookings that are at least booked 24 hours ahead of time. This can be useful for example reservations or renting services.
Last updated
[
{
"tag": "date",
"group": "form_elements",
"data": {
"name": "date",
"email": "Date:",
"placeholder": "Select a date",
"minlength": "1",
"showMonthAfterYear": "",
"showWeek": "",
"showOtherMonths": "",
"icon": "calendar"
}
},
{
"tag": "time",
"group": "form_elements",
"data": {
"name": "time",
"email": "Time:",
"placeholder": "Select a time",
"current_time": "true",
"icon": "clock;far"
}
},
{
"tag": "column",
"group": "layout_elements",
"inner": [
{
"tag": "time",
"group": "form_elements",
"data": {
"name": "start_time",
"email": "Time:",
"placeholder": "Select a time",
"value": "00:00",
"exclude": "2",
"exclude_entry": "true",
"icon": "clock;far"
}
},
{
"tag": "time",
"group": "form_elements",
"data": {
"name": "current_time",
"email": "Time:",
"placeholder": "Select a time",
"current_time": "true",
"exclude": "2",
"exclude_entry": "true",
"icon": "clock;far"
}
},
{
"tag": "calculator",
"group": "form_elements",
"data": {
"name": "future_timestamp",
"email": "Subtotal:",
"math": "({current_time;timestamp}/1000)+86400",
"decimals": "0",
"exclude": "2",
"exclude_entry": "true",
"icon": "calculator"
}
},
{
"tag": "calculator",
"group": "form_elements",
"data": {
"name": "diff_timestamp",
"email": "Subtotal:",
"math": "({date;timestamp}/1000)+({time;timestamp}/1000)-({start_time;timestamp}/1000)",
"decimals": "0",
"exclude": "2",
"exclude_entry": "true",
"icon": "calculator"
}
}
],
"data": {
"invisible": "true"
}
},
{
"tag": "column",
"group": "layout_elements",
"inner": [
{
"tag": "html",
"group": "html_elements",
"data": {
"name": "html",
"email": "HTML:",
"html": "<strong style=\"color:red;\">Reservations must be placed 24 hour ahead of time. Please choose a different time.</strong>",
"exclude": "2",
"exclude_entry": "true"
}
}
],
"data": {
"conditional_action": "show",
"conditional_items": [
{
"field": "{future_timestamp}",
"logic": "greater_than",
"value": "{diff_timestamp}",
"and_method": "",
"field_and": "",
"logic_and": "",
"value_and": ""
}
]
}
},
{
"tag": "column",
"group": "layout_elements",
"inner": [
{
"tag": "button",
"group": "form_elements",
"data": {
"name": "Submit",
"loading": "Loading..."
}
}
],
"data": {
"conditional_action": "show",
"conditional_items": [
{
"field": "{future_timestamp}",
"logic": "less_than_or_equal",
"value": "{diff_timestamp}",
"and_method": "",
"field_and": "",
"logic_and": "",
"value_and": ""
}
]
}
}
]