Title: Adding more fields
Last modified: August 21, 2016

---

# Adding more fields

 *  Resolved [Akohy](https://wordpress.org/support/users/akohy/)
 * (@akohy)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/adding-more-fields-4/)
 * Awesome plugin! This is everything I wanted after research and testing alot of
   diffrent plugins!
 * Question: What’s the best way to add more fields to the form and also make it
   so I can insert them to the email?
 * I’m just a starting programeur and can’t really follow all the files, please 
   help!
 * Best regards,
 * Akohy
 * [https://wordpress.org/plugins/restaurant-reservations/](https://wordpress.org/plugins/restaurant-reservations/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [NateWr](https://wordpress.org/support/users/natewr/)
 * (@natewr)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/adding-more-fields-4/#post-5039057)
 * Hi Akohy,
 * Thanks for the kind words. It is possible to add your own custom booking form
   with your own fields and template tags (email notification values). In order 
   to do this, you’ll need to know how to use [WordPress’s hooks system](http://codex.wordpress.org/Plugin_API/Hooks)(
   actions and filters) in a custom plugin or your theme’s functions.php file. The
   hooks built into the plugin will allow you to add your own booking form, validate
   your new fields and set up the email notification tags.
 * If that sounds like something you can do, let me know and I’ll give you a few
   pointers on where to look in the code to find the right filters.
 * If not, you have a couple options:
 * 1. I do plan on writing an addon at some point in the future that would make 
   it easier to define custom fields through the admin interface. I can’t say when
   it will be available, but this is a commonly requested feature so I expect it
   will be the first addon I write.
 * 2. If it’s urgent for you, I take on small custom work like this for a fee. If
   you’re willing to pay me to write a custom plugin extension for you, please get
   in touch via the [contact form on my site](http://themeofthecrop.com/about/support).
   We can discuss your needs in more detail and figure out an appropriate cost.
 *  [BeyondLine](https://wordpress.org/support/users/beyondline/)
 * (@beyondline)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/adding-more-fields-4/#post-5039370)
 * Hi,
    i know how to use hooks so could you help me ? Where should i look in the
   code ? Could you tell me the right filters to use ?
 * Thanks for this plugin and your help.
    Olivier
 *  [NateWr](https://wordpress.org/support/users/natewr/)
 * (@natewr)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/adding-more-fields-4/#post-5039371)
 * Hi BeyondLine,
 * You’re going to want to look at [rtb_print_booking_form()](https://github.com/NateWr/restaurant-reservations/blob/master/includes/template-functions.php#L23)
   in `/include/template-functions.php`. In particular, you can modify the $fields
   array with the [rtb_booking_form_fields](https://github.com/NateWr/restaurant-reservations/blob/master/includes/template-functions.php#L134)
   filter.
 * To process the new fields, you’ll want to hook into [rtb_validate_booking_submission](https://github.com/NateWr/restaurant-reservations/blob/master/includes/Booking.class.php#L389)
   in `/include/Booking.class.php` to validate the data and store it in the Booking
   class. Then hook into [rtb_insert_booking_data](https://github.com/NateWr/restaurant-reservations/blob/master/includes/Booking.class.php#L418)
   to store core post data or [rtb_insert_booking_metadata](https://github.com/NateWr/restaurant-reservations/blob/master/includes/Booking.class.php#L436)
   to store post meta.
 * If you want the data included in an email, you can set up new template tags with
   the [rtb_notification_template_tags](https://github.com/NateWr/restaurant-reservations/blob/master/includes/Notification.class.php#L95)
   filter `/include/Notification.class.php`.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adding more fields’ is closed to new replies.

 * ![](https://ps.w.org/restaurant-reservations/assets/icon-128x128.png?rev=2205491)
 * [Five Star Restaurant Reservations - WordPress Booking Plugin](https://wordpress.org/plugins/restaurant-reservations/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/restaurant-reservations/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/restaurant-reservations/)
 * [Active Topics](https://wordpress.org/support/plugin/restaurant-reservations/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/restaurant-reservations/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/restaurant-reservations/reviews/)

## Tags

 * [add](https://wordpress.org/support/topic-tag/add/)
 * [email](https://wordpress.org/support/topic-tag/email/)

 * 3 replies
 * 3 participants
 * Last reply from: [NateWr](https://wordpress.org/support/users/natewr/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/adding-more-fields-4/#post-5039371)
 * Status: resolved