• Hi!

    Thanks for the plugin, it works like a charm!

    I was wondering if I can make something of a “reservation” form, where once a user selects an option from a dynamic dropdown field it becomes unavailable for other users.

    For instance, let’s say I have three houses for rent. I’ve populated the select options using php and it’s working fine. Now, once a user selects one house and submits the form, this house would no longer appear on the form. Is there a way to do that?

    Thank you very much!

Viewing 1 replies (of 1 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    Yes, but you will need to code this yourself.

    Q: is the source list of options dynamically filled from a set of posts/taxonomy or is hard-coded in your form?

    I suggest the former to the above question, this way you can simply add more content in your dashboard will be automatically reflected in your front-end form without having to maintain the form.

    Next, you will need to use the custom source filter option on the dynamic listing (see this tutorial if you are not sure what I am talking about). This allows you to programmatically choose which options to show or enable.

    When a form is submitted, you will need to hook the final submission action once the notification mail is sent (such as cf7 plugin’s wpcf7_mail_sent). If you need to keep a record of the submissions and booking, I suggest you use my other plugin, Post My CF7 Form which stores data using WP dashboard posts and taxonomies and makes it easier to interact with the data, in which case you have action hooks fired at the end of the submission saving process you can use too.

    When a booking has been submitted, you will need to flag the home/item that was booked, possibly for a date range if you need to show availability by dates. You can this as a post/taxonomy meta-field on the original source of the dynamic field. You can then retrieve that item’s data to hide or disable in the form field when you dynamically build the field in the first step above.

    I hope all this makes sense.

Viewing 1 replies (of 1 total)

The topic ‘Selection option unavailable after submit’ is closed to new replies.