close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

E cart 6 international phone number

Thread began 1/12/2018 2:05 pm by Jay Core Global Media | Last modified 1/12/2018 6:34 pm by Ray Borduin | 1284 views | 6 replies |

Jay Core Global Media

E cart 6 international phone number

Hi I have a site I built using cart 6. We have been getting a lot of international clients lately, they are having trouble checking out with the phone number validation. It is set to X (xxx)(xxx)(xxxx). I would like to make it required but, clients to be able to enter there country"s phone number. Current code for input looks like this


<div class="col-xs-12 col-sm-6 col-md-6">
<div class="form-group control-group">
<label for="Phone_Number" class="sublabel" > Phone:<span class="text-danger">&nbsp;*</span></label>
<input id="Phone_Number" name="Phone_Number" type="text" value="<?php echo(WA_coalesce(array($users->getColumnVal("UserPhone"),(isset($_GET["invalid"])?ValidatedField("confirmcart","Phone_Number"):"")))); ?>" class="form-control" tabindex="5" pattern="\(\d{3}\) \d{3}[\-]\d{4}" title="Please enter a 10 digit phone number" required="true" onBlur="WAValidatePN(document.getElementById('CheckoutWizard_NewFromBlank_Default').Phone_Number,'',false,true,'x (xxx) xxx-xxxx',document.getElementById('CheckoutWizard_NewFromBlank_Default').Phone_Number,0,true);">
<?php
if (ValidatedField('confirmcart','confirmcart')) {
if ((strpos((",".ValidatedField("confirmcart","confirmcart").","), "," . "4" . ",") !== false || "4" == "")) {
if (!(false)) {
?>
<span class="serverInvalidState" id="Phone_Number_ServerError">Please enter a least 10 digit phone number</span>
<?php //WAFV_Conditional confirm_cart.php confirmcart(4:)
}
}
}?>

</div>
</div>

Sign in to reply to this post

Ray BorduinWebAssist

remove this:

pattern="\(\d{3}\) \d{3}[\-]\d{4}"

and remove this:

onBlur="WAValidatePN(document.getElementById('CheckoutWizard_NewFromBlank_Default').Phone_Number,'',false,true,'x (xxx) xxx-xxxx',document.getElementById('CheckoutWizard_NewFromBlank_Default').Phone_Number,0,true);"

Sign in to reply to this post
Did this help? Tips are appreciated...

Jay Core Global Media

Thank you worked great. Also when I choose another country besides US the drop down for states disappears however a input box appears, there doesn't seem to be any validation on this however users cannot proceed without filling it out.

Sign in to reply to this post

Ray BorduinWebAssist

Please attach a copy of your confirm_cart.php page and I can tell you the lines to update.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jay Core Global Media

Here is the confirm cart page thank you ray

Sign in to reply to this post

Ray BorduinWebAssist

Update line 28 to:

$WAFV_Errors .= WAValidateRQ((($_POST["Country"] == "US")?$_POST["State"]:"NA") . "",true,7);

Sign in to reply to this post
Did this help? Tips are appreciated...

Jay Core Global Media

Thank you Ray worked good!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...