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

Tabular input: ActiveForm #7

Closed
bscheshirwork opened this issue Aug 28, 2017 · 2 comments
Closed

Tabular input: ActiveForm #7

bscheshirwork opened this issue Aug 28, 2017 · 2 comments

Comments

@bscheshirwork
Copy link

What steps will reproduce the problem?

Yii2 have a Model::validateMultiple() and guide for input multiple model and for guide-input-tabular-input

So... About tabular input:

Yii2 not have a native view for update and create. Also is not have a native reader for tabular input.

Typically usage - a main model and list of related models in one page of crud.
This is a regular usage. Each time needed I can't see a in-box solution.

What is the expected result?

in-box ActiveForm (widget like gridview? closure? gii generator?) for tabular input without foreach in main view and index-named field

Like this:

$form = TabularActiveForm::begin(['models' => $settings]);

foreach ($form->models as $index => $model) {
//template of table/list
    echo $form->renderItem($index, $viewFile);
//template of table/list
}

    echo $form->renderTemplateForNewItem();//new row with JS add any new rows and mark it
//template of table/list

TabularActiveForm::end();

What do you get instead?

out-of-box like this guide

and this example

        <? foreach($partModels as $index => $partModel): ?>
        <tr>
            <td>
                <?= $form->field($partModel, '['.$index.']description')->label(false)->textInput();?>
            </td>
            <td>
                <?= $form->field($partModel, '['.$index.']answer')->label(false)->checkbox([], false);?>
            </td>
        </tr>
        <? endforeach; ?>

not a user friendly

Third part widgets

Is better solution - third part widgets. As solution. For search.

single property and model table input (my choice)
unclead/yii2-multiple-input

another, so biggest
kartik-v/yii2-builder

Additional info

Q A
Yii version dev
@samdark samdark transferred this issue from yiisoft/yii2 Apr 24, 2019
@samdark samdark transferred this issue from yiisoft/view Jan 23, 2020
@bscheshirwork
Copy link
Author

Reason?

@samdark
Copy link
Member

samdark commented Oct 8, 2020

No active form in this package.

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

No branches or pull requests

3 participants