Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select field compatibility #6

Open
Donkfather opened this issue May 12, 2019 · 1 comment
Open

Select field compatibility #6

Donkfather opened this issue May 12, 2019 · 1 comment
Labels

Comments

@Donkfather
Copy link
Contributor

Hello,
First of all thank you for the field.
Second of all i think that adding an empty displayUsingLabels() method would be useful in order to make it interchangeable with the select field. In my case i have the following code:

$fieldClass = $field->options->count() < 4 ? RadioButton::class : Select::class;
$result = $fieldClass::make($field->label, $field->field_code)
                    ->displayUsingLabels()
                    ->options($field->options->pluck('label', 'value'));
@OwenMelbz
Copy link
Owner

Sorry I’m not familiar with the displayUsingLabels()

Are you able to provide a screenshot as to what you mean or a PR that I can merge?

@OwenMelbz OwenMelbz added the enhancement New feature or request label Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants