Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Coverting a radio button to a regular button?

Featured Replies

Coverting a radio button to a regular button?

 

Hey I'm pretty new here but I've been messing around with the web for years now : )

 

I'm currently working on a shopping cart redesign using Cubecart and I need to change the following radio box code to a normal clickable button, is that possiable?

 

Here is the code :

<input name="gateway" type="radio" value="{VAL_GATEWAY_FOLDER}" {VAL_CHECKED} />

 

I have two gateways installed that display, that basically replace 'VAL_GATEWAY_FOLDER'they are :

 

Print_Order_Form

Paypal_Payments_Pro

 

Hope that makes sense! Thanks for your help!

you can change radio to button. However it may end up calling the button Print_Order_Form or Paypal_Payments_Pro

 

EDIT: just checked, it does work and does display as Print_Order_Form. however if you rename your gateway to want you want dispolayed (eg; Print Form) then it works fine.

  • Author

Hey thanks for the response!

 

This is what I have tried :

 

<input type="button"  value="Print_Order_Form" onclick="javascript:submitDoc('gateway');" />
<input type="button"  value="Paypal_Payments_Pro" onclick="javascript:submitDoc('gateway');" />

 

So that would give me two buttons, however this doesn't work as nothing is submitted and name of the buttons is 'Print_Order_Form' etc which isn't ideal, I'm not sure how to hook these buttons up using the radio button code.

 

This is what I'm trying to achieve:

 

make_payment.jpg

 

Thanks again :)

  • Author

I think I got it to work with some crazy code editing : ) Hopefully there will not be any problems with it!

 

<!-- BEGIN: gateway -->
<br>
<div id="viewCart" class="wrapper">
   <div class="top"></div>
	<div class="inside">
		<!-- BEGIN: cart_false -->
			<p>{LANG_CART_EMPTY}</p>
		<!-- END: cart_false -->
		<!-- BEGIN: cart_true -->
			<div id="gateway">
				<!-- BEGIN: choose_gate -->
						<h1>Make Payment</h1>
						<p>Please choose your preferred payment method from those listed below.<br />
						Your order will not be completed until payment has cleared.</p>
					<div id="gatewayBG">
						<h1>{LANG_PAYMENT_SUMMARY}</h1>
					</div>
					<br clear="all" />
					<form action="{VAL_FORM_ACTION}" method="{VAL_FORM_METHOD}" name="gateway_Paypal" target="{VAL_TARGET}">
					<div id="gatewayBG">
						<h1>Paypal</h1>
						<div id="paypalGatewayImg">
							<img src="skins/{VAL_SKIN}/styleImages/paypal_gateway.jpg">
						</div>
						<p>Paypal payment method explain text here.</p>
					</div>
						<input name="gateway" type="hidden" value="PayPal" {VAL_CHECKED} />
						<input type="button" class="gatewayButton"  value="Pay with Paypal" onclick="javascript:submitDoc('gateway_Paypal');" />
					</form>
					<br clear="all" />
					<br clear="all" />
					<div id="gatewayBG">
						<form action="{VAL_FORM_ACTION}" method="{VAL_FORM_METHOD}" name="gateway_Print_Order_Form" target="{VAL_TARGET}">   
						<h1>Postal Order Form</h1>
						<p>Postal order form payment method explain text here.</p>
					</div>
						<input name="gateway" type="hidden" value="Print_Order_Form" {VAL_CHECKED} />
						<input type="button"  class="gatewayButton" value="Pay by Postal Order Form" onclick="javascript:submitDoc('gateway_Print_Order_Form');" />
					</form>
				<!-- END: choose_gate -->
				<!-- BEGIN: transfer -->
					<form action="{VAL_FORM_ACTION}" method="{VAL_FORM_METHOD}" name="gateway" target="{VAL_TARGET}">
						{FORM_PARAMETERS}
					<!-- BEGIN: auto_submit-->
						<p>{LANG_TRANSFERRING}</p>
						<p><img src="skins/{VAL_SKIN}/styleImages/progress.gif"  alt="Payment Gateway Progress" onload="submitDoc('gateway')" /></p>
					<!-- END: auto_submit-->
					<!-- BEGIN: manual_submit-->
						<p>{LANG_FORM_TITLE}</p>
						{FORM_TEMPLATE}
					<!-- END: manual_submit-->
                       <a href="javascript:submitDoc('gateway');" class="txtButton">{LANG_CHECKOUT_BTN}</a>
                       </form>
				<!-- END: transfer -->
				<br clear="all" />
				<br clear="all" />
			</div>
		<!-- END: cart_true -->
	</div>
</div>
<!-- END: gateway -->

Hi Richard,

 

My method only worked if there was only one payment gateway. Doh!.

 

Having looked at your fix, I don't see any reason why it wouldn't work. Have you tested it?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.