Skip to content
Discussion options

You must be logged in to vote

there is a tiny bug I would say, which is that the multiple selects values which I also stored as a json array into the database are stored as strings. This resulted the in_array function within the blade to fail. What I did was creating a custom select which only uses my custom view with the bug fix that casts the key to be a string.

<?php

declare(strict_types=1);

namespace App\Orchid\Fields;

use Orchid\Screen\Fields\Select;

/**
 * Class Custom Select.
 **/
class CustomSelect extends Select
{
    /**
     * @var string
     */
    protected $view = 'fields.custom.select';

}

note the string type cast

@component($typeForm, get_defined_vars())
    <div data-controller="select">
       …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@c-gross
Comment options

@rowanfuchs
Comment options

@c-gross
Comment options

@rowanfuchs
Comment options

Answer selected by c-gross
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants