[Skip to main content](#vessel-content)

#   Add radio button to switcher checkout

##

- **[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")**
- [![verzevoul's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8351-verzevoul "View verzevoul's Profile") Topic Author
- [ Offline](/forum/user/8351-verzevoul)

Less More

- Posts: 1195
- Thank you received: 13
-
-

10 years 4 months ago [\#244936](#244936) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  *[Add radio button to switcher checkout](/forum/27-checkout/885449-add-radio-button-to-switcher-checkout#244936 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.4  Hello,  in checkout / login.php file i have added a div called &quot;guest&quot; with a link to a custom page. There are the 2 radio buttons above that (login-register), can i make the &quot;guest&quot; button also a radio button?  Thank you in advance")* was created by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")*

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 2.5.28
-- PHP version -- : 5.4

Hello,

in checkout / login.php file i have added a div called "guest" with a link to a custom page. There are the 2 radio buttons above that (login-register), can i make the "guest" button also a radio button?

Thank you in advance

- [ ![image.jpg](/forum/attachment/32518) ](/forum/attachment/32518 "image.jpg") [ ](/forum/attachment/32518?download=1 "image.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NTQ0OS1hZGQtcmFkaW8tYnV0dG9uLXRvLXN3aXRjaGVyLWNoZWNrb3V0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

10 years 4 months ago [\#244942](#244942) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add radio button to switcher checkout](/forum/27-checkout/885449-add-radio-button-to-switcher-checkout#244942 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.4  Hello,  in checkout / login.php file i have added a div called &quot;guest&quot; with a link to a custom page. There are the 2 radio buttons above that (login-register), can i make the &quot;guest&quot; button also a radio button?  Thank you in advance")*

Hi,

Yes. Make sure that the input radio of your choice has the name Code:

data[register][registration_method]

so that it is in the same group as the other ones. And add an onchange attribute to it with your javascript code to hide/display your div.

The following user(s) said Thank You: [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NTQ0OS1hZGQtcmFkaW8tYnV0dG9uLXRvLXN3aXRjaGVyLWNoZWNrb3V0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")**
- [![verzevoul's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8351-verzevoul "View verzevoul's Profile") Topic Author
- [ Offline](/forum/user/8351-verzevoul)

Less More

- Posts: 1195
- Thank you received: 13
-
-

10 years 4 months ago [\#244991](#244991) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[Add radio button to switcher checkout](/forum/27-checkout/885449-add-radio-button-to-switcher-checkout#244991 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.4  Hello,  in checkout / login.php file i have added a div called &quot;guest&quot; with a link to a custom page. There are the 2 radio buttons above that (login-register), can i make the &quot;guest&quot; button also a radio button?  Thank you in advance")*

nicolas hi,

I m a bit low on javascript so if you could tell me how to do that i would really aprecciate it!
I will send you admin via email if you may please take a look.

Thank you!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NTQ0OS1hZGQtcmFkaW8tYnV0dG9uLXRvLXN3aXRjaGVyLWNoZWNrb3V0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 652
-
-

10 years 4 months ago -  10 years 4 months ago [\#245015](#245015) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Add radio button to switcher checkout](/forum/27-checkout/885449-add-radio-button-to-switcher-checkout#245015 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.4  Hello,  in checkout / login.php file i have added a div called &quot;guest&quot; with a link to a custom page. There are the 2 radio buttons above that (login-register), can i make the &quot;guest&quot; button also a radio button?  Thank you in advance")*

Hello,

You have to use "**onclick**" with some parameters in order to **redirect** when your customer click on the **Guest checkbox**.

Try to use this code **IN &lt;fieldset class="input"&gt;** like this : Code:

... $doc-&gt;addScriptDeclaration("\n&lt;!--\n".$js."\n//--&gt;\n"); echo JHTML::_('hikaselect.radiolist', $values, 'data[register][registration_method]', ' onchange="displayRegistration(this)"', 'value', 'text', $defaultSelection, false, false, true ); ?&gt; &lt;div class="crisregister"&gt; &lt;input class="crisregister" type="radio" name="data[register][registration_method]" id="data[register][registration_method]0" value="0" onclick="window.location.href='index.php?option=com_fabrik&amp;view=form&amp;formid=1&amp;Itemid=305'"/&gt;Guest &lt;/div&gt; &lt;/fieldset&gt; ...

And of course, remove this line :
&lt;div class="crisregister"&gt;&lt;a href="index.php?option=com_fabrik&amp;view=form&amp;formid=1&amp;Itemid=305"&gt;Guest&lt;/a&gt;&lt;/div&gt;

Hope this will fit your needs.

Regards

Last edit: 10 years 4 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

The following user(s) said Thank You: [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NTQ0OS1hZGQtcmFkaW8tYnV0dG9uLXRvLXN3aXRjaGVyLWNoZWNrb3V0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")**
- [![verzevoul's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8351-verzevoul "View verzevoul's Profile") Topic Author
- [ Offline](/forum/user/8351-verzevoul)

Less More

- Posts: 1195
- Thank you received: 13
-
-

10 years 4 months ago [\#245071](#245071) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[Add radio button to switcher checkout](/forum/27-checkout/885449-add-radio-button-to-switcher-checkout#245071 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.4  Hello,  in checkout / login.php file i have added a div called &quot;guest&quot; with a link to a custom page. There are the 2 radio buttons above that (login-register), can i make the &quot;guest&quot; button also a radio button?  Thank you in advance")*

Hello Philip,

thanks that's great! One more thing if possible, could the guest button display the form in the checkout page like login and regigister, instead of redirecting to another page?

Thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NTQ0OS1hZGQtcmFkaW8tYnV0dG9uLXRvLXN3aXRjaGVyLWNoZWNrb3V0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 652
-
-

10 years 4 months ago -  10 years 4 months ago [\#245073](#245073) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Add radio button to switcher checkout](/forum/27-checkout/885449-add-radio-button-to-switcher-checkout#245073 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.4  Hello,  in checkout / login.php file i have added a div called &quot;guest&quot; with a link to a custom page. There are the 2 radio buttons above that (login-register), can i make the &quot;guest&quot; button also a radio button?  Thank you in advance")*

Hello,

This is possible thanks to Javascript but that require some developer skills, ton use some radio button to leads to display or not.
See this example, [ **here**](http://stackoverflow.com/questions/15229732/show-a-div-onclick-and-hide-the-image-that-triggered-it).

And you have the Javascript documentation reference, [ **here**](http://www.w3schools.com/Js/).
If this is a little too much for you you can contact some developer, [ **here** ](https://www.hikashop.com/home/our-partners.html)on our [ **Partner page**](https://www.hikashop.com/home/our-partners.html).

Regards

Last edit: 10 years 4 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

The following user(s) said Thank You: [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NTQ0OS1hZGQtcmFkaW8tYnV0dG9uLXRvLXN3aXRjaGVyLWNoZWNrb3V0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.061 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
