TagsInput not displaying

public static function testingTag($getData)
{
if ($getData == "tag") {
return TagsInput::make('testing');
}
if ($getData == "text") {
return TextInput::make("testing");
}
return Select::make('testing');
}


Grid::make(3)
->schema(function (Closure $get) use ($form) {
$responseForm = [];

$select = Select::make('tagTest')
->options([
"tag" => "Tag",
"select" => "Select",
"text" => "text",

])
->reactive();
$responseForm[] = $select;
$tagTest = $get('tagTest');
if ($tagTest) {
$responseForm[] = self::testingTag($tagTest);
}

return $responseForm;
}),
public static function testingTag($getData)
{
if ($getData == "tag") {
return TagsInput::make('testing');
}
if ($getData == "text") {
return TextInput::make("testing");
}
return Select::make('testing');
}


Grid::make(3)
->schema(function (Closure $get) use ($form) {
$responseForm = [];

$select = Select::make('tagTest')
->options([
"tag" => "Tag",
"select" => "Select",
"text" => "text",

])
->reactive();
$responseForm[] = $select;
$tagTest = $get('tagTest');
if ($tagTest) {
$responseForm[] = self::testingTag($tagTest);
}

return $responseForm;
}),
i want to testing field based on what I am selecting in tagTest select field while other field is working fine but the TagsInput is not displaying
3 Replies
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
ba_mbi_07
ba_mbi_07OP17mo ago
i want to create field dynamically and i have 8 to 9 fields so i returned the field from a function ...or else i would have used hidden or visible...Anyway thanks a lot i used $set('field', [])...i kind of worked
ZedoX
ZedoX17mo ago
@ba_mbi_07 You were on the right path initially, just move the Select out of that grid component and try it
Want results from more Discord servers?
Add your server