Linelabox Support

Hello there! Welcome to Linelabox Support Forum. Post your question and our support specialists will help you. Look for the solution in the F.A.Q. first. Our support team is available for any questions or issues in the following working hours: Monday - Friday: 10:00 - 18:00.

OnePage/validate phone fields?

SariS
SariS
Offline
Is it possible to validate two fields in OnePage? What I need is two phone fields and after submitting the form the system should check if these two phone fields are same.


I found something in a Joomla forum and was thinking could this be used in this case? And where are the files for the Form Layout of OnePage and the submit button?

"Put this script in the Form Layout:


<script type="text/javascript">
function checkPhone(phone_2,phone_2b)
{
var e1 = document.getElementById('phone_2').value;
var e2 = document.getElementById('phone_2b').value;
if (e1 != e2)
{
alert('Not Equal!');
return false;
}
else
{
return true;
}
}
</script>

And set the additional attribute of the submit button to

onclick=" return checkPhone('phone_2','phone_2b');"
"
Responses (2)
  • Accepted Answer

    Wednesday, December 07 2016, 05:30 PM - #permalink
    0
    Hi Saris, are you using our One Page Checkout plugin?
    The reply is currently minimized Show
  • Accepted Answer

    SariS
    SariS
    Offline
    Wednesday, December 07 2016, 05:33 PM - #permalink
    0
    Yes I am
    The reply is currently minimized Show
Your Reply

VirtueMart Admin Theme

VMADMINLAB

Responsive VirtueMart 3 Administrator Template

Download
JOIN NOW!

New Joomla! 3 Template

REVOLAB

Responsive Joomla 3 Template / VirtueMart 3 Theme

Template Demo
JOIN NOW!

Recent Discussions

Hi i bought this module but it does not work vm 3.2.2 joomla 3.7.3 this mod...
1 day ago 1
Hi and thanks for this template. I'm trying to implement the homepage as u do i...
2 days ago 0
hi i'm using shoplab virtuemart 3 free template. i have set a product category ...
3 days ago 1
Example: &lt;a href="...
4 days ago 1

Who's Online

We have 324 guests and no members online

Linelabox.com is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla!® name is used under a limited license from Open Source Matters in the United States and other countries.
Copyright © 2014 Linelabox.com - Joomla! 3 / VirtueMart 3 Templates. All Rights Reserved.
Joomla! is Free Software released under the GNU General Public License. All other marks are the property of their respective owners.
LINELAB WEBDESIGN