I need to make the phone number field required. Could you tell me which part of the code I need to modify?
Thanks for your help!
Assuming that you have the "phone" field configured as the reserve field "2" on the reservation form (the default), here are some instructions on how to make the phone field required:
STEP 1: Make a backup of your ureserve.pl script... just in case.
STEP 2: Open your ureserve.pl script with any text editor such as WordPad.
STEP 3: Do a search on the following line:
if ($res_start_time >= $res_end_time)
(There will be exactly TWO occurances of that line in the script.)
(Hopefully the greater-than sign appeared correctly in the above line. This forum sometimes has trouble displaying greater-than and less-than signs.)
STEP 4: Just BEFORE BOTH of the occurances of that line, add the following 4 lines:
if (($reserve_field2 =~ /\S/) && (!($res_field2 =~ /\S/)))
&missing_input("Missing Input","Please enter $reserve_field2.");
STEP 5: After adding those 4 lines to BOTH places in the script... save the script... as TEXT if your editor asks... and try it out!
I tried to insert the 4 lines of code you suggested, but it didn't work. The phone number is still not a required field. Any suggestions?
Thanks for your help.
I just tried the modifications out myself on a test script here and they worked fine.
Did you remember to put the 4 lines of code in BOTH places in the script?
Double-check that, if you are still having a problem, then send us a support request at http://www.uburst.com/supportform.html ... and I'll make the change for you.
I'm sorry. I just tried to modify the script again, and this time it worked. I must have been sleeping when I tried it last week. Thanks a lot for your help!