Welcome, Guest. Please login or register.
Login with username, password and session length


VirtueMart 1.1.8 - [SECURITY RELEASE] is available! Read more....

  Advanced search

247038 Posts in 67506 Topics- by 258314 Members - Latest Member: aniketana
Pages: [1]   Go Down
Print
Author Topic: Required Fields  (Read 3278 times)
Paul Wheldon
Newbie
*
Posts: 13


« on: November 04, 2004, 04:00:04 AM »

Hi

Anyone know how to add phone number as a required field.

I've modifiy checkout_register_form.php to;

<td <?php if (stristr($_REQUEST['missing'],'phone_1')) echo $missing_style ?> width=\"30%\" nowrap=\"nowrap\" align=\"right\" >
     <?php echo $PHPSHOP_LANG->_PHPSHOP_SHOPPER_FORM_PHONE ?>*:</td>
            <td width=\"70%\" >
              <input type=\"text\" name=\"phone\" size=\"40\" value=\"<?php echo empty($_REQUEST['phone_1']) ? '' : $_REQUEST['phone_1']; ?>\" class=\"inputbox\" />
            </td>

This should display required fild in red, but where does the check take place ?

Cheers
Logged
Soeren
Administrator
Hero Member
*
Posts: 3106


VirtueMart Lead Developer


WWW
« Reply #1 on: November 04, 2004, 07:15:27 AM »

Hello,

this is already prepared.
Open the file \"/html/shop.registration.php\" and uncomment this line:

Code:

if (empty($_POST['phone_1'])) { $provided_required = false; $missing .= \"phone_1\"; }


This checks for an empty Phone_1 field.

ciao, soeren

Post edited by: soeren, at: 2004/11/04 14:16
Logged

The future of eCommerce: VirtueMart & Joomla!
http://virtuemart.net
--
The VirtueMart project needs your help! To be able to continue this project please contribute your skills. Read more.
Paul Wheldon
Newbie
*
Posts: 13


« Reply #2 on: November 04, 2004, 16:25:08 PM »

Thanks
That worked a treat
Nice piece of forward coding.

Cheers
Logged
Pages: [1]   Go Up
Print
Jump to: