Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editable column additional fields as hidden input -> disqus post:) #72

Closed
philippfrenzel opened this issue Sep 2, 2014 · 4 comments
Closed

Comments

@philippfrenzel
Copy link
Contributor

Hi, I'm trying to use the editable column within a grid, the problem is, that I need to "afterInput" two more hidden fields, that should be "POSTED" too... My Problem is now, that I can't access the MODEL of the current row, to grep the data to post over by submit...

 editableOptions => [
 'afterInput' => Html::hiddenInput('myid',$model->myid);

So I tried and played around with item, data, items[index], ... But I can't get the value of the record:( Do you have an Idea how to solve this?

Thanks Philipp

@kartik-v
Copy link
Owner

kartik-v commented Sep 2, 2014

The following will resolve this

@kartik-v
Copy link
Owner

kartik-v commented Sep 2, 2014

@philippfrenzel - check the grid demo page for an updated example of configuring afterInput as a callback for the EditableColumn.

@philippfrenzel
Copy link
Contributor Author

Thanks, I'll test it!

@alexsantm
Copy link

Hi...!! I had a big problem, and I need your help. I would like to build a single editable field, with 3 fields, I mean, when I click in one editable column, it shows a "form" with 3 columns, but inside gridview, similar to:
echo 'Address
';
$editable = Editable::begin([
'model'=>$model,
'attribute'=>'address',
'asPopover' => true,
'size'=>'md',
'displayValue' => '15th Main, OK, 10322',
'options'=>['placeholder'=>'Enter location...']
]);
$form = $editable->getForm();
echo Html::hiddenInput('kv-complex', '1');
$editable->afterInput =
$form->field($model, 'state_1')->widget(\kartik\widgets\Select2::classname(), [
'data'=>$data, // any list of values
'options'=>['placeholder'=>'Enter state...'],
'pluginOptions'=>['allowClear'=>true]
]) . "\n" .
$form->field($model, 'zip_code')->textInput(['placeholder'=>'Enter zip code...']);
Editable::end();

Any ideas?? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants