cancel
Showing results for 
Search instead for 
Did you mean: 

Admin HTML - Horizontal Radio Button

Admin HTML - Horizontal Radio Button

Hi,

 

I am currently trying to create a configuration section for my payment extensions in Store > Configurations > Sales > Payment Methods.

 

I have created a radio button but can't figure out how to make its orientation horizontal. 

 

<field id="xendit_env" translate="label" type="radios" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0">
    <label>Payment Mode</label>
    <source_model>Xendit\M2Invoice\Model\Adminhtml\Source\EnvRadioBtn</source_model>
    <comment>
        Choose live to have live transaction
    </comment>
    <attribute type="shared">1</attribute>
</field>

Any pointer would be greatly appreciated. What I found so far is magento's pattern library https://devdocs.magento.com/guides/v2.3/pattern-library/getting-user-input/form_elements/form_elemen... but can't find any reference on how to make it horizontal instead of vertical.

 

Thanks a lot!

2 REPLIES 2

Re: Admin HTML - Horizontal Radio Button

Hello @aulia hakiem_no 

 

Below i am sharing two links for the same - may be it can help you to put radio button horizontally.

 

https://magecomp.com/blog/add-radio-button-admin-system-configuration-magento-2/

 

https://magento.stackexchange.com/questions/138522/source-model-radio-button-in-system-xml-custom-mo...

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

Re: Admin HTML - Horizontal Radio Button

Hi @Manthan Dave ,

 

Thanks for your answer. I've followed those two links in my example, but still it only shows as vertical option instead of horizontal. Maybe there's some attribute that the `field` component that I can use?