Category : dropdown

i wanted to change dropdown value, when changing selected user in livewire each user is linked with specific routes this line of code worked well until i made the change : $this->routes = Auth::user()->routes->toArray(); This is Livewire Controller protected function initListsForFields(): void { $this->listsForFields[‘clients’] = Role::find(2)->users->pluck(‘name’,’id’); } // Set route with client is selected public ..

Read more

I have multiselect dropdown and want this to be dynamic dependent, I have followed this tutorial https://www.webslesson.info/2018/03/ajax-dynamic-dependent-dropdown-in-laravel.html. I am not getting values in dependent dropdown, when tried to debug it show the values are getting in devtools but not able see that on frontend also The tutorial i followed is for single select I want ..

Read more

I want to insert buyer name from dropdown list into database. how can I select my dropdown selected text and save it into database table. I have a dropdown field and some text field to insert data into my database table. Here is my controller: function GetBuyerList(){ $buyerList=BuyerModel::all();//get data from table // $buyerList=BuyerModel::lists(‘buyer_name’,’id’); //return $buyer_name; ..

Read more

BLADE FILE FOR EDIT <div class="form-group mb-3"> <label>Country:</label> <div class="col-sm-4"> <select id="country-dd" name="country[]" class="js-example-basic-multiple form-control" multiple="multiple"> @foreach($countries as $country) <option value="{{$country->id }}" {{$country->id == $user->country ? ‘selected’ : ” }}> {{$country->name}}</option> @endforeach </select> </div> </div> CONTROLLER public function edituser(Request $request, $id = null){ $this->authorize(‘Admin’); $userstateid = []; $user = new User; $user = $user->where(‘id’, $id)->first(); ..

Read more

I used the following code for web.php. Route::resource(‘products’, ‘ProductController’); Route::resource(‘products.galleries’, ‘GalleryController’); In this address http://localhost:8000/admin/products , I added this code <td><a href="{{ route(‘products.galleries.create’, $product->id) }}">Create</a></td> Then I defined it in create method, and control of GalleryController GalleryController.php public function create(Product $product) { return view(‘Admin.galleries.create’, compact(‘product’)); } The gallery is empty I am using dropdown $.ajax({ ..

Read more

Good days. I have the apply form. I want make automatically change other dropdown list when I select some data from previous. I want add drop down list before code below by name Country. when I change country below university list change automatically. show only selected country university. <div class="form-group select"> <div class="styled-select"> <select class="required" ..

Read more

bootstrap dropdown menu does not appear when it is clicked in navbar. how can I solve this problem ? <li class="nav-item dropdown"> <a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre> <span class="caret"></span> </a> <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown"> <a class="dropdown-item" href="{{ route(‘logout’) }}" onclick="event.preventDefault(); document.getElementById(‘logout-form’).submit();"> {{ __(‘Logout’) }} </a> <form id="logout-form" action="{{ route(‘logout’) }}" ..

Read more

I took an example on the Bootstrap website for a dropdown list with elements, everything is cool, it appeared, but when clicked, the list items are not displayed, more precisely, when clicked, nothing happens, I attached a screenshot below for better understanding, I would be very grateful for any help. journal.blade.php (Page where dropdown) @extends(‘layouts.layout’) ..

Read more

i have 2 dropwdowns when dropdown 1 option is selected it should disable dropdown 2 option so that you cannot select it here is my code <div class="form-group"> <label for="from_account">From Account:</label> <select class="form-control" name="from_account" id="selectBox1" onchange="checkvalue1()"> <option disabled selected>Transfer From Account</option> @foreach($accounts as $account) <option value="{{$account->id}}">{{$account->account_number}} {{$account->account_name}} R{{$account->current_balance}}</option> @endforeach </select> </div> <div class="form-group"> <label for="to_account">To ..

Read more

Hye everyone! I want to do update method for my dynamic dropdown. The issue is the update dropdown value show all value, as you all known, For example: Dropdown 1, user select fashion, then dropdown 2 will appear 1 value which is dress for example. Blade edit:- "<div class=’row’>"+ "<div class=’col-md-4′>"+ "<p>Shift Pattern ID</p>"+ "</div>"+ ..

Read more

Does anyone know why this this dropdown box stays on default option value Gender group? <label class="personal-label">Gender group</label> <select class="personal-type personal-select" name="gender_group" id="gender_group"> <option value="">Select Gender</option> <option value="ALL" @if(@Auth::guard(‘web’)->user()->gender_group==’ALL’) selected @endif>ALL</option> <option value="M" @if(@Auth::guard(‘web’)->user()->gender_group==’M’) selected @endif>Male</option> <option value="F" @if(@Auth::guard(‘web’)->user()->gender_group==’F’) selected @endif>Female</option> </select> Sourc..

Read more

I need help with my dropdown. Currently the dropdown display all options from database. However, what I want it to display option based on the user id only. For example, this form is for Urban Seafood, suppose the dropdown will only display Urban Seafood option instead of showing all options. Below is the controller and ..

Read more

I have a dropdown using wire:model <div class="form-group"> <label>Menu</label> <select wire:model="chapter_id" class="form-control @error(‘chapter_id’) is-invalid @enderror" placeholder="Menu"> @foreach ($chapters as $chapter) <option value="{{ $chapter->id }}">{{ $chapter->name }}</option> @endforeach </select> @error(‘chapter_id’) <div class="invalid-feedback">{{ $message }}</div> @enderror </div> It works if I do change the option (the $chapter_id assigned successfully). But, if I leave it default (not change ..

Read more

I want to create a filter dropdown for my project when I clicked on any services all the similar types of services a filterout. This is controller code ‘required’, ‘services’ => ‘required’, ‘technologies’ => ‘required’, ]; } public function export() { return Storage::disk(‘exports’)->download(‘export.csv’); } public function create() { // $this->pictures->store(‘pictures’); // $this->validate([ // ‘clientlogo’ => ..

Read more