Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi Puruz,

    By default, the date, time, party size, name and email fields are all required. Making another field required is pretty easy. Here’s a quick plugin demonstrating how to make the phone number required.

    Thread Starter puruz

    (@puruz)

    Great thanks! Also was curious about having the user comment added to the email?

    In the plugin code I linked above, find the following line:

    $template_tags['{phone}'] = $notification->booking->phone;

    Below this line add the following:

    $template_tags['{message}'] = $notification->booking->message;

    Then in your notification template use {message}. I think this will work, but I haven’t tested it.

    Thread Starter puruz

    (@puruz)

    phone requirement didnt work for me. Nor can I find where to put the code to show a message in the email.

    The code for the phone req. is there can you see possibly what i did wrong?

    As for the message I am not seeing the code you want me to look for…

    Thanks for any help!

    My mistake. I’ve updated the gist now so the required phone number plugin should work.

    You need to add the message code I posted on line 77 of this plugin, almost near the bottom.

    Thread Starter puruz

    (@puruz)

    I did this and this is what I see in my email (i put ‘test’ as the actual text):

    A new reservation request has been made for :

    Todd
    2 people
    2014-06-04 13:30:00
    {message}

    View pending bookings

    Ok, I’ve fixed another problem with the gist. Hopefully it will work for you with this change (you’ll need to add the message template tag again).

    If you still have problems with the {message} template tag, please post the full code for your plugin file at pastebin.com. I’ll have a look and make sure it’s set up properly.

    Hi NateWr,

    This is exactly what I’m looking to do on my site (make phone number required and send note with the email) – this might be a dumb question (I’m pretty new to this) but where do I add the changes? Do I create a new .php file in the Reservation addon directory?

    Thanks in advance!

    Hi LowAims,

    Here is the simplest way to do it if you’re not a developer. I’ve prepared a separate plugin for adding the message template tag.

    1. Download these files by right-clicking on them and saving them. required-phone-for-rtb.php and message-tag-for-rtb.php.

    2. Upload these files to your website’s /wp-content/plugins/ folder.

    3. In your WordPress admin area, go to Plugins, find the new plugins in your plugin list and Activate them. They’re called Message Template Tag addon for Restaurant Reservations and Message Template Tag addon for Restaurant Reservations.

    Thread Starter puruz

    (@puruz)

    Nate unfortunately none of these options have worked for me. I tried this last one and right clicking and saving isnt an option. I originally put the required-phone-for-rtb.php file in the Includes folder. Is this the correct place? And I added the line you wanted me to but neither work.

    Can I setup a user/pass for you?

    Thanks!

    Both .php files need to be placed in your /wp-content/plugins/ folder. The includes folder will not work.

    If you’re not sure how to right-click and save a link as a file, try a search on Google for “how to right click and save with [your browser name]”. It is without a doubt available on every modern browser.

    Hey NateWr,

    Worked a treat – Thanks a million!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Required fields’ is closed to new replies.