Replace old form with new form on the same module position

Replace an old form with a new form in the same module position.

Overview

The issue occurs when a form submission redirects to a new page, loading the entire page instead of just the new form within the module.
Use AJAX form submission and append the parameter &tvout=view to the redirect URL to load only the new form content in the module.

Answered
ChronoForms v6
pa patrick.h 20 Mar, 2019
Hi forum,

I have a module on my website with a form that has 2 input fields to be sent to a new form for a calculation to be done.
The result should be displayed in the new form on the same module position on the same page the old one was displayed.
How can I achieve this?

Thank you for your effort
Gr GreyHead 21 Mar, 2019
. . . and you could use a multi-page form.

Bob
pa patrick.h 21 Mar, 2019
Thank you.
Ajax submit works fine, but how does it load ONLY the new form in the module? Not the whole page
Currently I redirect (setup->submit->redirect) to another page (with transfer of the field parameters), which is then displayed in the module.

{redirect:http://......../index.php?option=com_chronoforms6&chronoform=Alter-Berechnung&alter=(data:alterBenutzerEingabe)&punkteanzahl=(data:punkteBenutzerEingabe)}
pa patrick.h 21 Mar, 2019
Other idea
Can I do it with a custom code in my old form with {chronoform:Alter-Berechnung}?
How is the syntax if I want to pass both variables to my new form?
{chronoform:Alter-Berechnung} and then something like this &alter=(data:alterBenutzerEingabe)&punkteanzahl=(data:punkteBenutzerEingabe)???
he healyhatman 21 Mar, 2019
Answer
If you don't want it to show the whole form then add &tvout=view to the end of the URL
pa patrick.h 22 Mar, 2019
I want to show the whole form but not the whole site in the module.

I have two forms ("Alter-Eingabe" (age-input) and "Alter-Berechnung" (age-calc)). "Age-input" form with 2 input fields which sends this currently with a url-redirect to the other form on another page.
There, the calculation takes place and the result is displayed.
With ajax submit the whole new site with "Age-calc" form is shown in the module, but i want to show only the "Age-calc" form in the module position
he healyhatman 22 Mar, 2019
Do what I said, made a mistake saying form when I meant site.
This topic is locked and no more replies can be posted.