How render form dynamically from presenter?

2 years ago

ziomski
Member | 7
+
0
-

Hello,
How to render a form dynamically from Presenter?
for example, I have 1st form validation:

public function signInFormSucceeded($form, $values) {
// I want to 'echo' 2nd form'
}

also, what should i put to .latte file?
Paweł

2 years ago

GEpic
Member | 561
+
0
-

Can you enlarge on / describe what do you want to achieve?

Last edited by GEpic (2017-04-11 23:48)

2 years ago

ziomski
Member | 7
+
0
-

GEpic wrote:

Can you enlarge on / describe what do you want to achieve?

after 1st form is submitted (signInFormSucceded function) i want to echo / render second, different form to the screen and hide the 1st form. Is this a good way to do this?

2 years ago

CZechBoY
Member | 3205
+
+1
-

2nd factor authentication?
You can try form wizard from Webchemistry.

https://github.com/…istry/wizard

2 years ago

ziomski
Member | 7
+
0
-

CZechBoY wrote:

2nd factor authentication?
You can try form wizard from Webchemistry.

https://github.com/…istry/wizard

great! thank you

Last edited by ziomski (2017-04-12 00:07)

2 years ago

ziomski
Member | 7
+
0
-

but, is it possible to do this still without external components?

2 years ago

Pavel Kravčík
Member | 944
+
0
-

We did simple step-form with some serialize data-object stored in session. Every formSuccess has redirect on another page with standalone component and data from previous form are loaded from session. On the end is easy show some recap or put into db.