Created
June 22, 2016 23:59
-
-
Save jsivakumaran/594a57b80706325dcc6837d74c291495 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$membershipFee = ArrayHelper::map(Fee::find()->joinWith('feeLists')->where(['fee_list_id'=>$membership->fee_list_id])->orderBy('name')->all(), 'id', 'name'); | |
// echo $form->field($memberEnroll, 'id[]',['inputOptions' => ['class' => 'form-control','id'=>'fee-id','tabindex'=>4]])->dropDownList($membershipFee)->label('Membership Fee'); | |
echo Select2::widget([ | |
'model' => $memberEnroll, | |
'attribute' => 'id[]', | |
'data'=> ArrayHelper::map($fees, 'id', 'name'), | |
'options' => [ | |
'placeholder' => 'Select Complex ...', 'multiple' => false, | |
'class' => 'col-md-3', | |
'id'=> 'fee-id' //this is the key | |
], | |
'pluginOptions' => [ | |
'allowClear' => true, | |
], | |
]); | |
?> | |
var fee_id = $('#fee-id').val(); //the jquery |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment