How to combine two attributes on select2 in yii2
up vote
-1
down vote
favorite
I want to combine two attributes on select2 like this:
I want to attribute kodepos and kabupaten in one dropdown. and kodepos and kabupaten attributes are included in the database. Can anyone help me? thank you
<?= $form->field($model, 'origin')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),'kodepos','kodepos'),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kode Pos','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
<?= $form->field($model, 'origin_name')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),'kabupaten','kabupaten'),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kota Asal','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
yii yii2 yii2-advanced-app
add a comment |
up vote
-1
down vote
favorite
I want to combine two attributes on select2 like this:
I want to attribute kodepos and kabupaten in one dropdown. and kodepos and kabupaten attributes are included in the database. Can anyone help me? thank you
<?= $form->field($model, 'origin')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),'kodepos','kodepos'),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kode Pos','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
<?= $form->field($model, 'origin_name')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),'kabupaten','kabupaten'),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kota Asal','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
yii yii2 yii2-advanced-app
not clear what are the names of theattributes
that you want to show there? there are 2 different select dropdowns that you are talking about, you need to add which attributes you want to show as text for the first and second drop-down.
– Muhammad Omer Aslam
Nov 11 at 16:14
sorry, I want to attribute kodepos and kabupaten in one dropdown
– Herdi
Nov 11 at 16:39
you want a single dropdown instead of 2 drop-downs ? if i am getting you correctly
– Muhammad Omer Aslam
Nov 11 at 16:42
i have added an answer below with an update see EDIT part for correct solution.
– Muhammad Omer Aslam
Nov 11 at 16:43
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I want to combine two attributes on select2 like this:
I want to attribute kodepos and kabupaten in one dropdown. and kodepos and kabupaten attributes are included in the database. Can anyone help me? thank you
<?= $form->field($model, 'origin')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),'kodepos','kodepos'),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kode Pos','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
<?= $form->field($model, 'origin_name')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),'kabupaten','kabupaten'),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kota Asal','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
yii yii2 yii2-advanced-app
I want to combine two attributes on select2 like this:
I want to attribute kodepos and kabupaten in one dropdown. and kodepos and kabupaten attributes are included in the database. Can anyone help me? thank you
<?= $form->field($model, 'origin')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),'kodepos','kodepos'),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kode Pos','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
<?= $form->field($model, 'origin_name')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),'kabupaten','kabupaten'),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kota Asal','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
yii yii2 yii2-advanced-app
yii yii2 yii2-advanced-app
edited Nov 11 at 17:53
asked Nov 11 at 12:29
Herdi
75
75
not clear what are the names of theattributes
that you want to show there? there are 2 different select dropdowns that you are talking about, you need to add which attributes you want to show as text for the first and second drop-down.
– Muhammad Omer Aslam
Nov 11 at 16:14
sorry, I want to attribute kodepos and kabupaten in one dropdown
– Herdi
Nov 11 at 16:39
you want a single dropdown instead of 2 drop-downs ? if i am getting you correctly
– Muhammad Omer Aslam
Nov 11 at 16:42
i have added an answer below with an update see EDIT part for correct solution.
– Muhammad Omer Aslam
Nov 11 at 16:43
add a comment |
not clear what are the names of theattributes
that you want to show there? there are 2 different select dropdowns that you are talking about, you need to add which attributes you want to show as text for the first and second drop-down.
– Muhammad Omer Aslam
Nov 11 at 16:14
sorry, I want to attribute kodepos and kabupaten in one dropdown
– Herdi
Nov 11 at 16:39
you want a single dropdown instead of 2 drop-downs ? if i am getting you correctly
– Muhammad Omer Aslam
Nov 11 at 16:42
i have added an answer below with an update see EDIT part for correct solution.
– Muhammad Omer Aslam
Nov 11 at 16:43
not clear what are the names of the
attributes
that you want to show there? there are 2 different select dropdowns that you are talking about, you need to add which attributes you want to show as text for the first and second drop-down.– Muhammad Omer Aslam
Nov 11 at 16:14
not clear what are the names of the
attributes
that you want to show there? there are 2 different select dropdowns that you are talking about, you need to add which attributes you want to show as text for the first and second drop-down.– Muhammad Omer Aslam
Nov 11 at 16:14
sorry, I want to attribute kodepos and kabupaten in one dropdown
– Herdi
Nov 11 at 16:39
sorry, I want to attribute kodepos and kabupaten in one dropdown
– Herdi
Nov 11 at 16:39
you want a single dropdown instead of 2 drop-downs ? if i am getting you correctly
– Muhammad Omer Aslam
Nov 11 at 16:42
you want a single dropdown instead of 2 drop-downs ? if i am getting you correctly
– Muhammad Omer Aslam
Nov 11 at 16:42
i have added an answer below with an update see EDIT part for correct solution.
– Muhammad Omer Aslam
Nov 11 at 16:43
i have added an answer below with an update see EDIT part for correct solution.
– Muhammad Omer Aslam
Nov 11 at 16:43
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
You need to change the ArrayHelper::map()
to use the closure
for the third parameter or the $to
parameter and return the 2 fields concatenated as you want.
The field names are not clear that you want to show as text in the first and second drop-down so I assume the integer value to be coming from the id
field.
I will add the code that will show the id
and kodepos
concatenated as the text for the first drop-down and show the id
and kabupaten
concatenated as the text for the second drop-down. Change them accordingly in the code
<?= $form->field($model, 'origin')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),'kodepos',function($model)return $model->id.$model->kodepos),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kode Pos','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
<?= $form->field($model, 'origin_name')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),'kabupaten',function($model)return $model->id.$model->kabupaten),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kota Asal','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
EDIT:
You want the kodepos
and kabupaten
in one drop-down rather than making 2 drop-downs so change the code to the following
<?= $form->field($model, 'origin')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),function($model)return $model->kodepos.$model->kabupaten),function($model)return $model->kodepos.$model->kabupaten),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kode Pos','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
the dropdown is correct. thank you. but only kodepos attributes are included in the database. i want the kabupaten attribute to enter also in the database
– Herdi
Nov 11 at 17:46
are you saying that you want to save thekodepos
andkabupaten
for the field nameorigin
in the database? @Herdi
– Muhammad Omer Aslam
Nov 11 at 17:51
yes sir, is it possible?
– Herdi
Nov 11 at 17:56
well, change the$from
parameter to useclosure
in the same way as i did for the$to
and return your desired fields from theclosure
. @Herdi
– Muhammad Omer Aslam
Nov 11 at 17:58
Sorry, I don't understand
– Herdi
Nov 11 at 18:09
|
show 5 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
You need to change the ArrayHelper::map()
to use the closure
for the third parameter or the $to
parameter and return the 2 fields concatenated as you want.
The field names are not clear that you want to show as text in the first and second drop-down so I assume the integer value to be coming from the id
field.
I will add the code that will show the id
and kodepos
concatenated as the text for the first drop-down and show the id
and kabupaten
concatenated as the text for the second drop-down. Change them accordingly in the code
<?= $form->field($model, 'origin')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),'kodepos',function($model)return $model->id.$model->kodepos),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kode Pos','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
<?= $form->field($model, 'origin_name')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),'kabupaten',function($model)return $model->id.$model->kabupaten),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kota Asal','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
EDIT:
You want the kodepos
and kabupaten
in one drop-down rather than making 2 drop-downs so change the code to the following
<?= $form->field($model, 'origin')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),function($model)return $model->kodepos.$model->kabupaten),function($model)return $model->kodepos.$model->kabupaten),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kode Pos','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
the dropdown is correct. thank you. but only kodepos attributes are included in the database. i want the kabupaten attribute to enter also in the database
– Herdi
Nov 11 at 17:46
are you saying that you want to save thekodepos
andkabupaten
for the field nameorigin
in the database? @Herdi
– Muhammad Omer Aslam
Nov 11 at 17:51
yes sir, is it possible?
– Herdi
Nov 11 at 17:56
well, change the$from
parameter to useclosure
in the same way as i did for the$to
and return your desired fields from theclosure
. @Herdi
– Muhammad Omer Aslam
Nov 11 at 17:58
Sorry, I don't understand
– Herdi
Nov 11 at 18:09
|
show 5 more comments
up vote
0
down vote
accepted
You need to change the ArrayHelper::map()
to use the closure
for the third parameter or the $to
parameter and return the 2 fields concatenated as you want.
The field names are not clear that you want to show as text in the first and second drop-down so I assume the integer value to be coming from the id
field.
I will add the code that will show the id
and kodepos
concatenated as the text for the first drop-down and show the id
and kabupaten
concatenated as the text for the second drop-down. Change them accordingly in the code
<?= $form->field($model, 'origin')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),'kodepos',function($model)return $model->id.$model->kodepos),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kode Pos','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
<?= $form->field($model, 'origin_name')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),'kabupaten',function($model)return $model->id.$model->kabupaten),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kota Asal','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
EDIT:
You want the kodepos
and kabupaten
in one drop-down rather than making 2 drop-downs so change the code to the following
<?= $form->field($model, 'origin')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),function($model)return $model->kodepos.$model->kabupaten),function($model)return $model->kodepos.$model->kabupaten),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kode Pos','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
the dropdown is correct. thank you. but only kodepos attributes are included in the database. i want the kabupaten attribute to enter also in the database
– Herdi
Nov 11 at 17:46
are you saying that you want to save thekodepos
andkabupaten
for the field nameorigin
in the database? @Herdi
– Muhammad Omer Aslam
Nov 11 at 17:51
yes sir, is it possible?
– Herdi
Nov 11 at 17:56
well, change the$from
parameter to useclosure
in the same way as i did for the$to
and return your desired fields from theclosure
. @Herdi
– Muhammad Omer Aslam
Nov 11 at 17:58
Sorry, I don't understand
– Herdi
Nov 11 at 18:09
|
show 5 more comments
up vote
0
down vote
accepted
up vote
0
down vote
accepted
You need to change the ArrayHelper::map()
to use the closure
for the third parameter or the $to
parameter and return the 2 fields concatenated as you want.
The field names are not clear that you want to show as text in the first and second drop-down so I assume the integer value to be coming from the id
field.
I will add the code that will show the id
and kodepos
concatenated as the text for the first drop-down and show the id
and kabupaten
concatenated as the text for the second drop-down. Change them accordingly in the code
<?= $form->field($model, 'origin')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),'kodepos',function($model)return $model->id.$model->kodepos),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kode Pos','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
<?= $form->field($model, 'origin_name')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),'kabupaten',function($model)return $model->id.$model->kabupaten),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kota Asal','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
EDIT:
You want the kodepos
and kabupaten
in one drop-down rather than making 2 drop-downs so change the code to the following
<?= $form->field($model, 'origin')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),function($model)return $model->kodepos.$model->kabupaten),function($model)return $model->kodepos.$model->kabupaten),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kode Pos','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
You need to change the ArrayHelper::map()
to use the closure
for the third parameter or the $to
parameter and return the 2 fields concatenated as you want.
The field names are not clear that you want to show as text in the first and second drop-down so I assume the integer value to be coming from the id
field.
I will add the code that will show the id
and kodepos
concatenated as the text for the first drop-down and show the id
and kabupaten
concatenated as the text for the second drop-down. Change them accordingly in the code
<?= $form->field($model, 'origin')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),'kodepos',function($model)return $model->id.$model->kodepos),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kode Pos','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
<?= $form->field($model, 'origin_name')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),'kabupaten',function($model)return $model->id.$model->kabupaten),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kota Asal','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
EDIT:
You want the kodepos
and kabupaten
in one drop-down rather than making 2 drop-downs so change the code to the following
<?= $form->field($model, 'origin')->label('Origin')->widget(Select2::classname(), [
'data' => ArrayHelper::map(MKota::find()->all(),function($model)return $model->kodepos.$model->kabupaten),function($model)return $model->kodepos.$model->kabupaten),
'theme' => Select2::THEME_BOOTSTRAP,
'language' => 'en',
'options' => ['placeholder' => 'Pilih Kode Pos','required' => true,'style'=>'width:500px','maxlength' => true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
edited Nov 11 at 18:20
answered Nov 11 at 16:21
Muhammad Omer Aslam
11.8k62344
11.8k62344
the dropdown is correct. thank you. but only kodepos attributes are included in the database. i want the kabupaten attribute to enter also in the database
– Herdi
Nov 11 at 17:46
are you saying that you want to save thekodepos
andkabupaten
for the field nameorigin
in the database? @Herdi
– Muhammad Omer Aslam
Nov 11 at 17:51
yes sir, is it possible?
– Herdi
Nov 11 at 17:56
well, change the$from
parameter to useclosure
in the same way as i did for the$to
and return your desired fields from theclosure
. @Herdi
– Muhammad Omer Aslam
Nov 11 at 17:58
Sorry, I don't understand
– Herdi
Nov 11 at 18:09
|
show 5 more comments
the dropdown is correct. thank you. but only kodepos attributes are included in the database. i want the kabupaten attribute to enter also in the database
– Herdi
Nov 11 at 17:46
are you saying that you want to save thekodepos
andkabupaten
for the field nameorigin
in the database? @Herdi
– Muhammad Omer Aslam
Nov 11 at 17:51
yes sir, is it possible?
– Herdi
Nov 11 at 17:56
well, change the$from
parameter to useclosure
in the same way as i did for the$to
and return your desired fields from theclosure
. @Herdi
– Muhammad Omer Aslam
Nov 11 at 17:58
Sorry, I don't understand
– Herdi
Nov 11 at 18:09
the dropdown is correct. thank you. but only kodepos attributes are included in the database. i want the kabupaten attribute to enter also in the database
– Herdi
Nov 11 at 17:46
the dropdown is correct. thank you. but only kodepos attributes are included in the database. i want the kabupaten attribute to enter also in the database
– Herdi
Nov 11 at 17:46
are you saying that you want to save the
kodepos
and kabupaten
for the field name origin
in the database? @Herdi– Muhammad Omer Aslam
Nov 11 at 17:51
are you saying that you want to save the
kodepos
and kabupaten
for the field name origin
in the database? @Herdi– Muhammad Omer Aslam
Nov 11 at 17:51
yes sir, is it possible?
– Herdi
Nov 11 at 17:56
yes sir, is it possible?
– Herdi
Nov 11 at 17:56
well, change the
$from
parameter to use closure
in the same way as i did for the $to
and return your desired fields from the closure
. @Herdi– Muhammad Omer Aslam
Nov 11 at 17:58
well, change the
$from
parameter to use closure
in the same way as i did for the $to
and return your desired fields from the closure
. @Herdi– Muhammad Omer Aslam
Nov 11 at 17:58
Sorry, I don't understand
– Herdi
Nov 11 at 18:09
Sorry, I don't understand
– Herdi
Nov 11 at 18:09
|
show 5 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53248772%2fhow-to-combine-two-attributes-on-select2-in-yii2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
not clear what are the names of the
attributes
that you want to show there? there are 2 different select dropdowns that you are talking about, you need to add which attributes you want to show as text for the first and second drop-down.– Muhammad Omer Aslam
Nov 11 at 16:14
sorry, I want to attribute kodepos and kabupaten in one dropdown
– Herdi
Nov 11 at 16:39
you want a single dropdown instead of 2 drop-downs ? if i am getting you correctly
– Muhammad Omer Aslam
Nov 11 at 16:42
i have added an answer below with an update see EDIT part for correct solution.
– Muhammad Omer Aslam
Nov 11 at 16:43