Author Amy on 06-11-2002 at 06:58 (EST)
|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!
|Messages In This Discussion|
| 1. RE: Required Field|
Author Bill Weiner on 06-12-2002 at 04:02 (EST)
|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!
| 2. Modification Didn't work|
Author Amy on 06-20-2002 at 13:54 (EST)
|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.
| 3. RE: Modification Didn't work|
Author Bill Weiner on 06-21-2002 at 04:45 (EST)
|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.
| 4. Oops|
Author Amy on 06-24-2002 at 09:42 (EST)
|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!