| 
 | ||||||||||
|  | Shopping cart software Solutions for online shops and malls | |||||||||
|  |  |  | ||||||||
| 
			 
			#1  
			
			
			
			
		 | |||||||||
| 
 | |||||||||
|  Donate page ver - 4.1.12 Ok so I have a donate page on a site I built. Right now I just left the price blank so they can enter an amount in. Is there a way to have a drop down with various amounts AND the empty text box as an other option? 
				__________________ xcart 5.1.2 | |||||||||
| 
			 
			#2  
			
			
			
			
		 | |||||||||
| 
 | |||||||||
|  Re: Donate page You can. Just do a check after submit - if textbox empty use the amount from dropdown else use the amount from textbox. Also have to do check textbox allows numbers only. You have to do js client side check but also server side check in case js is turned off in customers browser 
				__________________ Steve Stoyanov CFLSystems.com Web Development | |||||||||
| 
			 
			#3  
			
			
			
			
		 | |||||||||
| 
 | |||||||||
|  Re: Donate page ok I can do the JS part, but how do I do the server side part? 
				__________________ xcart 5.1.2 | |||||||||
| 
			 
			#4  
			
			
			
			
		 | |||||||
| 
 | |||||||
|  Re: Donate page Noob at PHP but perhaps something like this? $var = intval($_POST['formName']); | |||||||
| 
			 
			#5  
			
			
			
			
		 | |||||||||
| 
 | |||||||||
|  Re: Donate page yeah, Im a design guy, so writing PHP to check that might be over my head.  I'll check it out. 
				__________________ xcart 5.1.2 | |||||||||
| 
			 
			#6  
			
			
			
			
		 | |||||||
| 
 | |||||||
|  Re: Donate page Stupid forum submitted my post before I wanted. What I posted before was simply making sure it was posted as an integar. For checking which was submitted you could do maybe something like this: Code: 
 Again, I'm a noob at php and may be insecure or used too much logic/faulty logic. | |||||||
| 
			 
			#7  
			
			
			
			
		 | |||||||||
| 
 | |||||||||
|  Re: Donate page Yes you need to do that in the php file responsible for processing the form. Something like var1 -dropdown var2 - text field P.S. same happened to me - forum submitted before I finished PHP Code: 
		
				__________________ Steve Stoyanov CFLSystems.com Web Development | |||||||||
|  | |||
| 
X-Cart forums © 2001-2020
 | |||