-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
post data not available #45
Comments
How form looks? |
and in latte: |
What returns this |
Yes form is instance of UI\From.
But $form->getValues() emprty variants |
I tried following code $form = new Form();
$form->addGroup("Variants")
->setOption("id", "variants");
$multiplier = $form->addMultiplier(
'variants',
function (Container $container) {
$container->addSelect("rarity", "Rarity", ['one', 'two']);
$container->addText("value", "Value")->setDefaultValue("x");
$container->addTextArea("text", "Text", NULL, 10);
bdump($container);
},
1,
10
);
$multiplier->addCreateButton('Add')
->addClass('btn btn-primary ajax');
$multiplier->addRemoveButton('Remove')
->addClass('btn btn-danger ajax');
$form->addGroup("");
$form->addSubmit("s", "Save");
$form->onSuccess[] = function ($form, $values) {
bdump($form->getValues());
bdump($values);
};
return $form; and nette dumps correct values. Where do you dump the values? |
OK I think I found a problem. Not sure on whose side... |
Hi,
I have current (9afdae2) version and have problem with accessing form data. When I dump($_REQUEST) I see everything was submitted via request. Hovever if I want to access multipliers items via $form->getValues()->multiplier there is no data. My multiplier has name variants:
$_REQUEST:
variants => 0 => rarity => "1" value => "500" text => "text"
$form->getValues():
variants => Nette\Utils\ArrayHash #1462
$form->getComponent("variants")->getComponents():
Nette\ComponentModel\RecursiveComponentIterator #ca3d
Did I miss something in documentation, badly register it or just simply replicator is not compatible with nette/3.0?
The text was updated successfully, but these errors were encountered: