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

how to pass a single value instead of a array when you single select #1128

Open
sohailahmad07 opened this issue Aug 17, 2023 · 0 comments
Open
Labels

Comments

@sohailahmad07
Copy link

i am using livewire with choices js for single input and i want to pass an singular value (string) instead of any array how can i do that

<select aria-label='module' x-init='new Choices($el, {
                                searchPlaceholderValue: "search For module",
                                allowHTML: false
                    });'
                            class='dark:text-white dark:bg-gray-dark-2 border-none text-black bg-gray-100 w-full pl-8 block mt-1
                    py-5 rounded-xl focus-none rounded-md shadow-sm'
                            label="Select Module" name="module"
                            wire:model.defer="module">
                        <option value="" selected>Select Your Grade Category</option>
                        @if($program)
                            @foreach($program->modules as $moduleItem)
                                <option value="{{ $moduleItem->id }}">{{ $moduleItem->title }}</option>
                            @endforeach
                        @endif
                    </select>
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

1 participant