Search
 
SCRIPT & CODE EXAMPLE
 

PHP

populate old value of dropdown laravel

# Populate Old value with default value selected
<select name="dial_code" id="dial_code">
@foreach($countries as $c)
    <option value="{{$c->phone_code}}" title="{{$c->name}}" {{old('dial_code', 966) == $c->phone_code ? 'selected' : ''}}>{{$c->iso2}} ({{$c->phone_code}})</option>
@endforeach
</select>
Comment

PREVIOUS NEXT
Code Example
Php :: laravel group route controller 
Php :: php isset post 
Php :: php strftime 
Php :: how to redirect to another page in php 
Php :: lcomposer symfony/filesystem 
Php :: $this- attribute laravel 
Php :: wordpress get attachment url by size 
Php :: php mac address 
Php :: 18 year back date in php 
Php :: larvel make http request 
Php :: laravel query latest 
Php :: wordpress get post body 
Php :: convert numeric array to string array php 
Php :: get id php 
Php :: php get current dir mac 
Php :: unset session key 
Php :: install php 7.3 ubuntu 
Php :: iterating rows in php 
Php :: valet switch php version 
Php :: if i am using $_SERVER it shows 500 error 
Php :: laravel run schedule locally 
Php :: do while php 
Php :: wordpress get post type 
Php :: Laravel Syntax error or access violation: 1071 Specified key was too long 
Php :: laravel socialite 
Php :: ent_quotes in php 
Php :: laravel event generate 
Php :: laravel validation unique two columns 
Php :: symfony see all make command 
Php :: install laravel in bootstrap 8 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =