Hi @amitbiswas06,
The field callbacks are fired outside of an object context, unless you pass the object in with the callback method (eg – array($myObject, 'myMethod')).
You can see how I re-arrange the field and fieldset order in Luigi using this code:
https://github.com/NateWr/luigi/blob/master/includes/integrations/restaurant-reservations.php
You are really very helpful. @natewr, I really appreciate you on this. I understand things you described here. Though I am not a core PHP developer, but I understand things here. I saw the code and understand it now. Thank you so much for your quick response. You are great.
I may ask for tiny helps in future (if needed. I hope you wont mind) as I am developing a theme and I will use this plugin and the “business profile” and I am going to recommend it. I will let you know once I am done. It’s nearly 80% ready by now.
-Amit Biswas
Hi @amitbiswas06,
I’d love to see the theme when you’re done, and I’m happy to help provide support for integrating the booking form with your theme. Are you planning to release this theme publicly?
If so, please reach out to me via the contact form on my site. I’d be happy to help make sure your theme is fully compatible with all of the plugin’s addons as well.
https://themeofthecrop.com/contact/
Thanks @natewr. My theme will be GPL 3 compatible. I will tell you once I complete the theme. I want another small help. Can you tell me the right way to include a class to the existing ‘fieldset’ of ‘contact’ and ‘reservation’?
Hi @amitbiswas06,
Yes, please do let me know when it’s available.
You can add classes to fieldsets or fields using the rtb_booking_form_fields filter:
https://github.com/NateWr/restaurant-reservations/blob/master/includes/Settings.class.php#L894
This allows you to modify the $fields array which defines the parameters of the form, and fields and fieldsets can take a parameter to define classes. The class params are documented here:
https://github.com/NateWr/restaurant-reservations/blob/master/includes/Settings.class.php#L787-L822
Dear Nate,
I hope you are doing great. I am now back to work after a while. I now have successfully published my new restaurant theme on themeforest. As promised, I have recommended both of your plugin in my theme. RoyalFood theme is fully compatible with “business profile” and “restaurant reservations” plugin.
Here is the link –
Royal Food – Restaurant and Recipe WordPress Theme
Let me know if you have any suggestions to improve it better in future.
I also have a plan to release the theme (with limited features) to public.
Thanks!
-Amit
Congrats! It looks great, thanks for letting me know!