( ! ) Warning: foreach() argument must be of type array|object, bool given in /home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php on line 790
Call Stack
#TimeMemoryFunctionLocation
10.0124448960{main}( ).../extended-users-form.php:0
20.02111530384phpformbuilder\FormExtended->addAddress( $i = 1 ).../extended-users-form.php:56
30.02151531080phpformbuilder\Form->addCountrySelect( $select_name = 'country-1', $label = 'Country', $attr = 'class=no-autoinit, data-width=100%, required', $user_options = ??? ).../FormExtended.php:100
Variables in local scope (#3)
$aria_label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$array_values =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=2)
  'id' => string 'country-1' (length=9)
  'attributs' => string 'class="no-autoinit" data-width="100%" required' (length=46)
$attr =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '="no-autoinit" data-width="100%" required' (length=41)
$class =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'no-autoinit  f32' (length=16)
$countries =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:boolean true
$country_code =
Undefined
$country_name =
Undefined
$data_attr =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string ' data-slimselect=true data-flag-size=32' (length=39)
$element =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '<select name="country-1" id="country-1" class="no-autoinit  f32" data-slimselect=true data-flag-size=32 ="no-autoinit" data-width="100%" required>' (length=146)
$end_col =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$end_label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '</label>' (length=8)
$end_wrapper =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$id =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'country-1' (length=9)
$label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'Country' (length=7)
$option_attr =
Undefined
$option_list =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$options =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=5)
  'plugin' => string 'slimselect' (length=10)
  'lang' => string 'en' (length=2)
  'flags' => boolean true
  'flag_size' => int 32
  'return_value' => string 'name' (length=4)
$out =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=4)
  0 => string 'class=no-autoinit' (length=17)
  1 => string '' (length=0)
  2 => string '' (length=0)
  3 => string 'no-autoinit' (length=11)
$select_name =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'country-1' (length=9)
$start_col =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '<div class="col-md-9">' (length=22)
$start_label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '<label for="country-1" class="col-md-3 col-form-label">Country <sup class="text-danger">* </sup>' (length=96)
$start_wrapper =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '<div class="form-group row">' (length=28)
$theme =
Undefined
$user_options =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=0)
  empty
$xml_node =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'countries-flags-32' (length=18)

( ! ) Warning: foreach() argument must be of type array|object, bool given in /home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php on line 790
Call Stack
#TimeMemoryFunctionLocation
10.0124448960{main}( ).../extended-users-form.php:0
20.02311543016phpformbuilder\FormExtended->addBirth( $i = 2 ).../extended-users-form.php:54
30.02361544424phpformbuilder\Form->addCountrySelect( $select_name = 'birth_country-2', $label = 'Birth Country', $attr = 'class=no-autoinit, data-width=100%', $user_options = ??? ).../FormExtended.php:117
Variables in local scope (#3)
$aria_label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$array_values =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=2)
  'id' => string 'birth_country-2' (length=15)
  'attributs' => string 'class="no-autoinit" data-width="100%"' (length=37)
$attr =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '="no-autoinit" data-width="100%"' (length=32)
$class =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'no-autoinit  f32' (length=16)
$countries =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:boolean true
$country_code =
Undefined
$country_name =
Undefined
$data_attr =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string ' data-slimselect=true data-flag-size=32' (length=39)
$element =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '<select name="birth_country-2" id="birth_country-2" class="no-autoinit  f32" data-slimselect=true data-flag-size=32 ="no-autoinit" data-width="100%">' (length=149)
$end_col =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$end_label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '</label>' (length=8)
$end_wrapper =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$id =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'birth_country-2' (length=15)
$label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'Birth Country' (length=13)
$option_attr =
Undefined
$option_list =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$options =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=5)
  'plugin' => string 'slimselect' (length=10)
  'lang' => string 'en' (length=2)
  'flags' => boolean true
  'flag_size' => int 32
  'return_value' => string 'name' (length=4)
$out =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=4)
  0 => string 'class=no-autoinit' (length=17)
  1 => string '' (length=0)
  2 => string '' (length=0)
  3 => string 'no-autoinit' (length=11)
$select_name =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'birth_country-2' (length=15)
$start_col =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '<div class="col-md-3">' (length=22)
$start_label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '<label for="birth_country-2" class="col-md-2 col-form-label">Birth Country' (length=74)
$start_wrapper =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$theme =
Undefined
$user_options =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=0)
  empty
$xml_node =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'countries-flags-32' (length=18)

( ! ) Warning: foreach() argument must be of type array|object, bool given in /home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php on line 790
Call Stack
#TimeMemoryFunctionLocation
10.0124448960{main}( ).../extended-users-form.php:0
20.02421991576phpformbuilder\FormExtended->addAddress( $i = 2 ).../extended-users-form.php:56
30.02471996368phpformbuilder\Form->addCountrySelect( $select_name = 'country-2', $label = 'Country', $attr = 'class=no-autoinit, data-width=100%, required', $user_options = ??? ).../FormExtended.php:100
Variables in local scope (#3)
$aria_label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$array_values =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=2)
  'id' => string 'country-2' (length=9)
  'attributs' => string 'class="no-autoinit" data-width="100%" required' (length=46)
$attr =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '="no-autoinit" data-width="100%" required' (length=41)
$class =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'no-autoinit  f32' (length=16)
$countries =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:boolean true
$country_code =
Undefined
$country_name =
Undefined
$data_attr =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string ' data-slimselect=true data-flag-size=32' (length=39)
$element =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '<select name="country-2" id="country-2" class="no-autoinit  f32" data-slimselect=true data-flag-size=32 ="no-autoinit" data-width="100%" required>' (length=146)
$end_col =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$end_label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '</label>' (length=8)
$end_wrapper =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$id =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'country-2' (length=9)
$label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'Country' (length=7)
$option_attr =
Undefined
$option_list =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$options =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=5)
  'plugin' => string 'slimselect' (length=10)
  'lang' => string 'en' (length=2)
  'flags' => boolean true
  'flag_size' => int 32
  'return_value' => string 'name' (length=4)
$out =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=4)
  0 => string 'class=no-autoinit' (length=17)
  1 => string '' (length=0)
  2 => string '' (length=0)
  3 => string 'no-autoinit' (length=11)
$select_name =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'country-2' (length=9)
$start_col =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '<div class="col-md-9">' (length=22)
$start_label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '<label for="country-2" class="col-md-3 col-form-label">Country <sup class="text-danger">* </sup>' (length=96)
$start_wrapper =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '<div class="form-group row">' (length=28)
$theme =
Undefined
$user_options =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=0)
  empty
$xml_node =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'countries-flags-32' (length=18)

( ! ) Warning: foreach() argument must be of type array|object, bool given in /home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php on line 790
Call Stack
#TimeMemoryFunctionLocation
10.0124448960{main}( ).../extended-users-form.php:0
20.02672002368phpformbuilder\FormExtended->addBirth( $i = 3 ).../extended-users-form.php:54
30.02742003616phpformbuilder\Form->addCountrySelect( $select_name = 'birth_country-3', $label = 'Birth Country', $attr = 'class=no-autoinit, data-width=100%', $user_options = ??? ).../FormExtended.php:117
Variables in local scope (#3)
$aria_label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$array_values =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=2)
  'id' => string 'birth_country-3' (length=15)
  'attributs' => string 'class="no-autoinit" data-width="100%"' (length=37)
$attr =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '="no-autoinit" data-width="100%"' (length=32)
$class =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'no-autoinit  f32' (length=16)
$countries =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:boolean true
$country_code =
Undefined
$country_name =
Undefined
$data_attr =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string ' data-slimselect=true data-flag-size=32' (length=39)
$element =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '<select name="birth_country-3" id="birth_country-3" class="no-autoinit  f32" data-slimselect=true data-flag-size=32 ="no-autoinit" data-width="100%">' (length=149)
$end_col =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$end_label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '</label>' (length=8)
$end_wrapper =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$id =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'birth_country-3' (length=15)
$label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'Birth Country' (length=13)
$option_attr =
Undefined
$option_list =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$options =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=5)
  'plugin' => string 'slimselect' (length=10)
  'lang' => string 'en' (length=2)
  'flags' => boolean true
  'flag_size' => int 32
  'return_value' => string 'name' (length=4)
$out =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=4)
  0 => string 'class=no-autoinit' (length=17)
  1 => string '' (length=0)
  2 => string '' (length=0)
  3 => string 'no-autoinit' (length=11)
$select_name =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'birth_country-3' (length=15)
$start_col =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '<div class="col-md-3">' (length=22)
$start_label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '<label for="birth_country-3" class="col-md-2 col-form-label">Birth Country' (length=74)
$start_wrapper =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$theme =
Undefined
$user_options =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=0)
  empty
$xml_node =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'countries-flags-32' (length=18)

( ! ) Warning: foreach() argument must be of type array|object, bool given in /home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php on line 790
Call Stack
#TimeMemoryFunctionLocation
10.0124448960{main}( ).../extended-users-form.php:0
20.02782008160phpformbuilder\FormExtended->addAddress( $i = 3 ).../extended-users-form.php:56
30.02852009176phpformbuilder\Form->addCountrySelect( $select_name = 'country-3', $label = 'Country', $attr = 'class=no-autoinit, data-width=100%, required', $user_options = ??? ).../FormExtended.php:100
Variables in local scope (#3)
$aria_label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$array_values =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=2)
  'id' => string 'country-3' (length=9)
  'attributs' => string 'class="no-autoinit" data-width="100%" required' (length=46)
$attr =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '="no-autoinit" data-width="100%" required' (length=41)
$class =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'no-autoinit  f32' (length=16)
$countries =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:boolean true
$country_code =
Undefined
$country_name =
Undefined
$data_attr =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string ' data-slimselect=true data-flag-size=32' (length=39)
$element =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '<select name="country-3" id="country-3" class="no-autoinit  f32" data-slimselect=true data-flag-size=32 ="no-autoinit" data-width="100%" required>' (length=146)
$end_col =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$end_label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '</label>' (length=8)
$end_wrapper =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$id =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'country-3' (length=9)
$label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'Country' (length=7)
$option_attr =
Undefined
$option_list =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '' (length=0)
$options =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=5)
  'plugin' => string 'slimselect' (length=10)
  'lang' => string 'en' (length=2)
  'flags' => boolean true
  'flag_size' => int 32
  'return_value' => string 'name' (length=4)
$out =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=4)
  0 => string 'class=no-autoinit' (length=17)
  1 => string '' (length=0)
  2 => string '' (length=0)
  3 => string 'no-autoinit' (length=11)
$select_name =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'country-3' (length=9)
$start_col =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '<div class="col-md-9">' (length=22)
$start_label =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '<label for="country-3" class="col-md-3 col-form-label">Country <sup class="text-danger">* </sup>' (length=96)
$start_wrapper =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string '<div class="form-group row">' (length=28)
$theme =
Undefined
$user_options =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:
array (size=0)
  empty
$xml_node =
/home/phpformbuilder/public_html/phpformbuilder/traits/Elements.php:790:string 'countries-flags-32' (length=18)
Bootstrap 4 Extended Users Form - How to create PHP forms easily

Php Form Builder - Extended Users Form
Build a complete users form with a very few lines of code

This form shows how you can create your own functions with the PHP FormExtended class.

Here, custom functions are called in a loop to create the fields for each user.

User 1


User 2


User 3