Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

k.daniel.adams on "Add availability to date field"

$
0
0

I'm using the free version of Ninja Forms. My client has a catering event reservation form on their website. They want to limit the date field in the form to allow only certain days based on their fluid catering event availability. This means they need to be able to change availability at whim, and the form should respond.

I'm really not sure how to go about doing this...I was thinking maybe a custom post type to represent confirmed events, and then the form's date picker could poll the database for that custom post type to determine availability.

I know how to create a custom post type. I'm not sure of two things:

1. How to make a post type that allows a user to enter a date as a DATETIME object in PHP, rather than a string? I know posts always have the date they were posted on, I need to be able to choose a date to attach to a post.

2. How to get the datepicker plugin to look at posts of that type, and limit it's selectable dates to dates which are not currently occupied by those posts?


Viewing all articles
Browse latest Browse all 8245

Trending Articles