Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Show additional fields at customer checkout only if a checked box is checked

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-12-2012, 12:14 AM
 
chris.ath chris.ath is offline
 

Member
  
Join Date: Aug 2007
Posts: 27
 

Default Show additional fields at customer checkout only if a checked box is checked

Hello,

I would like to show the additional fields at customer checkout only if a new checked box is checked ( like Ship to a different address).

Can some one help me please?
__________________
Chris
X-Cart 4.4.2
Reply With Quote
  #2  
Old 04-13-2012, 09:54 AM
 
chris.ath chris.ath is offline
 

Member
  
Join Date: Aug 2007
Posts: 27
 

Default Re: Show additional fields at customer checkout only if a checked box is checked

I need something like this


http://i44.tinypic.com/1zxbazn.jpg
__________________
Chris
X-Cart 4.4.2
Reply With Quote
  #3  
Old 04-13-2012, 10:07 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Show additional fields at customer checkout only if a checked box is checked

Look at how "ship to..." is done and replicate it or you can also use jQuery toggle to show/hide a div
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
chris.ath (04-13-2012)
  #4  
Old 04-13-2012, 10:16 AM
 
chris.ath chris.ath is offline
 

Member
  
Join Date: Aug 2007
Posts: 27
 

Wink Re: Show additional fields at customer checkout only if a checked box is checked

Quote:
Originally Posted by cflsystems
Look at how "ship to..." is done and replicate it or you can also use jQuery toggle to show/hide a div
Hi Steve,

Thanks a lot for your reply, but i can't until now make this works. Can you please help a little bit more.

Thanks in advance,
Chris
__________________
Chris
X-Cart 4.4.2
Reply With Quote
  #5  
Old 04-17-2012, 04:27 PM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default Re: Show additional fields at customer checkout only if a checked box is checked

We did something like this by adding an onclick to the checkbox which points to a function like this:
Code:
function toggleOtherFields(c) { if (c.checked) { $("#otherField1").show("fast") $("#otherField2").show("fast") } else { $("#otherField1").hide("fast") $("#otherField2").hide("fast") } }
The onclick would be like this:
Code:
onclick="toggleOtherFields(this)"
Add the appropriate ids to each element to hide/show and match the names with those set in the function.
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 05:29 PM.

   

 
X-Cart forums © 2001-2020