Closed Bhoft closed 5 years ago
You can use the options
property using the code above
<?php QueryBuilderForm::begin([
'builder' => [
'id' => 'query-builder',
'pluginOptions' => [
'rules' => new \yii\web\JsExpression($rules),
'filters' => [
['id' => 'id', 'label' => 'Id', 'type' => 'integer'],
['id' => 'name', 'label' => 'Name', 'type' => 'string'],
['id' => 'lastName', 'label' => 'Last Name', 'type' => 'string']
]
]
]
])?>
Hi i have seen your extension for the JQueryBuilder and have one Question.
Is there a reason that you pass the
$rules
to the QueryBuilderForm and not add it to thepluginOptions
directly?Which would then add JS code to set the rules.
instead of set it directly?
I mean you even didn't use the $rules given to the QueryBuilderForm e.g. add the json version already to the
echo Html::hiddenInput($this->rulesParam);
as value?