Edit Form Label and add input fields
-
i’m just wondering how could i change form labels and add mor inputs to the form
Thanks in advance
-
Hi asabbour,
The last question in the plugin’s FAQ includes instructions on how to translate the plugin, including all the form labels.
I’m working on an addon to easily add custom fields to the form. Until that’s available, you’ll need to know how to write a custom plugin extension to add a field. If you’re comfortable doing that, here is a quick guide to the steps required:
1. Add a field by hooking into the rtb_booking_form_fields filter:
https://github.com/NateWr/restaurant-reservations/blob/master/includes/Settings.class.php#L810
Read the inline documentation on the $fields array:
https://github.com/NateWr/restaurant-reservations/blob/master/includes/Settings.class.php#L703-L738
2. Validate the form input and add it to a booking object by hooking into the rtb_validate_booking_submission action:
https://github.com/NateWr/restaurant-reservations/blob/master/includes/Booking.class.php#L426
3. Add the new booking object data to the post meta that is saved by hooking into the rtb_insert_booking_metadata filter:
https://github.com/NateWr/restaurant-reservations/blob/master/includes/Booking.class.php#L497
4. When the booking is retrieved from the database, you’ll need to make sure it gets your new post metadata entry and adds it to the booking object. Do this by hooking into the rtb_booking_load_post_data action:
https://github.com/NateWr/restaurant-reservations/blob/master/includes/Booking.class.php#L68
5. Create a new notification template tag that will allow you to add the value of your new field to a notification email. For instance, if you are adding a “branch” field, you could add a {branch} notification template tag that will print the booking’s branch value. Do this by hooking into the rtb_notificiation_template_tags filter:
https://github.com/NateWr/restaurant-reservations/blob/master/includes/Notification.class.php#L96
Hi Nate!
Thanks for this plugin!
I’m just wondering if is possible to export the reservations schedule data, to for example, google calendar? I’m thinking in to show the reservations calendar on the web. Is that possible?Thank f?r you time ??
/Marco
Hi Marco,
No, this isn’t possible. I’m very close to releasing a plugin that will allow you to export reservation data to an Excel/CSV file. Google Calendars allows you to import events from a CSV file. But it won’t do this automatically. You’d still need to export the bookings and load the file into Google Calendars every time you wanted to update.
Hello,
I can not receive email notification from booking
plz help me
Hi YOUGRAPH,
Please take a look at the FAQ, which includes a 5-step checklist for tracking down the source of the problem when you don’t receive emails.
I watch the 5 steps and ca not work
please add me skype : megafaycoHi YOUGRAPH,
Sorry, I don’t provide support over Skype. Have you contacted your site’s web host with all the details?
yes he told me to contact you, I am at 1and1
Hi YOUGRAPH,
You may need to demand better support from your hosting provider. When you provide them with a date and time of an email that was sent but never received, they should be able to check their email logs and tell you what happened to the email. If they’re not doing this for you, then you need to be persistent.
I’m sorry I can’t be more helpful, but if you’ve verified steps 1-4 in the FAQ, then the problem lies with the email server on your web host. You will need to force them to look into the broken email delivery on their end.
This is what gave me my hoster
2015-04-27 16:21:11 1YmjuI-0001Jo-II ** [email protected] R=smtp T=remote_smtp: SMTP error from remote mail server after MAIL FROM:<> SIZE=3479: host mx3.hotmail.com [65.55.37.104]: 550 OU-002 (COL004-MC3F38) Unfortunately, messages from 217.160.90.167 weren’t sent. Please contact your Internet service provider since part of their network is on our block list. You can also refer your provider to https://mail.live.com/mail/troubleshooting.aspx#errors.
—
2015-04-27 16:17:56 1Ymjr9-0000A4-Am ** [email protected] R=smtp T=remote_smtp: SMTP error from remote mail server after end of data: host gmail-smtp-in.l.google.com [173.194.65.27]: 550-5.7.1 [217.160.90.167 12] Our system has detected that this message is\n550-5.7.1 likely unsolicited mail. To reduce the amount of spam sent to Gmail,\n550-5.7.1 this message has been blocked. Please visit\n550-5.7.1 https://support.google.com/mail/bin/answer.py?hl=en&answer=188131 for\n550 5.7.1 more information. g7si33337839wjy.213 – gsmtp
Hi YOUGRAPH,
That means Hotmail has decided your server is sending spam. This is an issue that 1and1 must sort out for you. There are lots of factors that can contribute to this and your web host should work through the potential problems to improve your delivery rates. If they don’t, then change hosts.
ok thanks you ??
Hello NateWr,
I’m setting your good restaurants reservation plugin in a website under nuvo theme. You can see the website online there : https://www.escale-mezos.fr !
The plugin is runing at ‘reservation’ section and i look for an issue to translate the label of the 3 top fields (When…+PartySize+Preffered…). I lost many hours yesterday and this morning trying all (?) but i don’t find !
Can you help me please to find the file i’ve to change ?
Thank you !!Ok i’ve found it in the nuvo theme code = wp_nuvo\framework\shortcodes\bookingtable\bookingtable.php !! If it can help sb !! =)
Hi rdelrio,
The NUVO theme has completely overridden the default booking form in this plugin, so you’ll need to contact NUVO for help translating those fields. If they’ve set things up right, you should be able to use the normal translation workflow to translate the strings, as you would any other theme or plugin strings.
- The topic ‘Edit Form Label and add input fields’ is closed to new replies.