Title: remove time field
Last modified: August 30, 2016

---

# remove time field

 *  Resolved [rickgrosso](https://wordpress.org/support/users/rickgrosso/)
 * (@rickgrosso)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/remove-time-field/)
 * Hello,
    I need to remove Time Slot selection from the front-end.
 * There is no need for website owner to have a time selection because his costumers
   know when to show up.
 * There’s anything I can do or some addon you can give me? I’ve appreciated this
   plugin and I don’t want to move to anything else, this is the only problem I 
   have and I’d love to fix it asap.
 * Thanks.
 * PS: I’ve tried with some coding, but I’m not able to do that.
 * [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)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/remove-time-field/#post-6581386)
 * Hi rickgrosso,
 * No, unfortunately there’s no way to do this at the moment without writing some
   code.
 * I saw you commented on that other support request. Possibly an easier technique
   you could use would be to overwrite the callback function in the `$fields` array
   to print a hidden time field with a dummy time value. You’d want to hook into
   the [`rtb_booking_form_fields` filter](https://github.com/NateWr/restaurant-reservations/blob/master/includes/Settings.class.php#L834).
 *  Thread Starter [rickgrosso](https://wordpress.org/support/users/rickgrosso/)
 * (@rickgrosso)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/remove-time-field/#post-6581404)
 * Hi NateWr,
 * could you help with a “step by step” help? Like “overwrite the callback function
   in the $fields array to print a hidden time fiedl with a dummy time vaulue”. 
   Thanks what I’d love to do: every single reservation is going to be at 7.30pm.
   How can I do that?
 * That’s would be very helpful!
 * Thanks so much.
 *  [NateWr](https://wordpress.org/support/users/natewr/)
 * (@natewr)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/remove-time-field/#post-6581469)
 * Hi rickgrosso,
 * Here’s a bit of example code that shows how to [hook in and modify the party’s callback function](https://gist.github.com/NateWr/b015b059bba49bea67fb#file-remove-party-for-rtb-php-L31-L42).
   You’d need to use the same principle to modify the time field by changing this
   line:
 *     ```
       $fields['reservation']['fields']['party']['callback'] == '__return_false';
       ```
   
 * To this:
 *     ```
       $fields['reservation']['fields']['time']['callback'] == 'rickgrosso_custom_date';
       ```
   
 * That tells the plugin to call your own custom function, `rickgrosso_custom_date()`,
   when it wants to print the time field. So just create your own custom function
   with that name that prints a hidden value:
 *     ```
       function rickgrosso_custom_date( $slug, $title, $value, $args = array() ) {
         echo '<input type="hidden" name="rtb-' . $slug . '" value="7:30 PM">';
       }
       ```
   
 * I haven’t tested that code but it should give you a rough idea of what you want
   to do. There may be some knock-on problems with the time picker, but I’m not 
   sure.

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

The topic ‘remove time field’ 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

 * [form](https://wordpress.org/support/topic-tag/form/)
 * [time](https://wordpress.org/support/topic-tag/time/)
 * [time field](https://wordpress.org/support/topic-tag/time-field/)

 * 3 replies
 * 2 participants
 * Last reply from: [NateWr](https://wordpress.org/support/users/natewr/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/remove-time-field/#post-6581469)
 * Status: resolved