Open jeesus opened 8 years ago
@jeesus maybe it's a silly question, but do you have this column (phone
) in your db table?
Yes, I do. When using regular ActiveForm textInput()
, the field gets saved properly. I'll look into it again later today, maybe I can figure out something.
@jeesus is this issue still relevant?
@Borales I have the same problem, POST doesn't consist phone field;
<?= $form->field($model, 'phone')->widget(PhoneInput::className(), [ 'options' => ['class' => 'form-control'], 'jsOptions' => [ 'preferredCountries' => ['ua', 'ru'], ] ]) ?>
Hey
Really nice plugin you have here. But I'm having difficulties using it. The thing is that whenever I use this extension with ActiveForm in Yii2, the field is never posted. I printed out
Yii::$app->request->post()
just to be sure and the phone field is always missing. Previously I used the original JS plugin and had the same problem, which I never figured out.This is my code in model:
The view:
One thing more... when I won't define
$phone
as public variable in model, the initial flag in the input field is not appearing. Defining it won't solve the general problem though. Any ideas?