PHPackages                             codicastudio/conditional-radio-field - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. codicastudio/conditional-radio-field

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

codicastudio/conditional-radio-field
====================================

A random Codica Studio package.

1.0.0(5y ago)04MITVuePHP ^7.4 || ^8.0

Since Sep 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/codicastudio/conditional-radio-field)[ Packagist](https://packagist.org/packages/codicastudio/conditional-radio-field)[ Docs](https://github.com/codicastudio/conditional-radio-field)[ RSS](/packages/codicastudio-conditional-radio-field/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Laravel Nova Radio Button Group Field Type
==========================================

[](#laravel-nova-radio-button-group-field-type)

This is a simple nova field type to introduce a radio button with the ability to toggle other field visibility.

Installation
------------

[](#installation)

`composer require owenmelbz/nova-radio-field`

Usage
-----

[](#usage)

```
use OwenMelbz\RadioField\RadioButton;

public function fields(Request $request)
{
    return [
        RadioButton::make('Can view skip adverts?')
            ->options([
                0 => 'No',
                1 => ['Yes' => 'This means that users will not have to watch adverts.'],
            ])
            ->default(0) // optional
            ->stack() // optional (required to show hints)
            ->marginBetween() // optional
            ->skipTransformation() // optional
            ->toggle([  // optional
                1 => ['max_skips', 'skip_sponsored'] // will hide max_skips and skip_sponsored when the value is 1
            ])
    ];
}
```

Configuration
-------------

[](#configuration)

### options()

[](#options)

This accepts basic string/integer key-pair values. The key of the array will be saved in the database, and the value will be displayed.

If you assign an array to the value, it will act as a key-pair for a label and a hint when using `stack()`

[![hint view](https://camo.githubusercontent.com/21f10b07a983e73b96ae747d6573b3a38c54fba107a77e04ace62e2227d3caa8/68747470733a2f2f692e696d6775722e636f6d2f4e38616a6151452e6a7067)](https://camo.githubusercontent.com/21f10b07a983e73b96ae747d6573b3a38c54fba107a77e04ace62e2227d3caa8/68747470733a2f2f692e696d6775722e636f6d2f4e38616a6151452e6a7067)

### toggle()

[](#toggle)

This accepts an array, the key of the array represents the value of the field. The value of the item must always be an array of the fields you wish to hide, when this value is picked.

e.g. if this array was passed in, when the value is `1` the `email` field will be hidden, any other value will show everything.

```
toggle([
    1 => ['email']
])

```

### default()

[](#default)

This lets you set the default radio button, otherwise none will be selected - You just pass in the value of the key, e.g 0

### stack()

[](#stack)

By default the radios will sit next to each other, if you want them underneath in a longer list call the `stack()` method

### marginBetween()

[](#marginbetween)

If you happen to have lots of options that fold onto 2 lines, you might want to give them some spacing.

### skipTransformation()

[](#skiptransformation)

By default on the index and detail page we display the labelled value to the user, if you want to show the raw value instead, then call `skipTransformation()`

License
-------

[](#license)

Go crazy, do what you like :)

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2097d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4a33b354bea681b74be49f37bbe9f3c4f145dbefe0f2b5cbb705b0731bf13fd3?d=identicon)[codicastudio](/maintainers/codicastudio)

### Embed Badge

![Health badge](/badges/codicastudio-conditional-radio-field/health.svg)

```
[![Health](https://phpackages.com/badges/codicastudio-conditional-radio-field/health.svg)](https://phpackages.com/packages/codicastudio-conditional-radio-field)
```

###  Alternatives

[incoming/incoming

Transform loose and complex input into consistent, strongly-typed data structures

21987.4k](/packages/incoming-incoming)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
