Can't have a series of froms due to ItemId-param

How to create a multi-form chain in ChronoForms when the menu ItemId parameter interferes.

Overview

The issue occurs because the ItemId from the initial menu item persists in the URL, causing subsequent forms to redirect back to the first form instead of progressing through the chain.
Create hidden menu items in Joomla for each form submission event and use those menu names in the Action URL boxes of your CF forms to bypass the sticky ItemId parameter.

Answered
la larsomato 25 Mar, 2016
Hi!

I try to get a multi-form survey working.
There is a Joomla menu item that serves form_a. As the "on submit" action I use "Load Form" with "form_b", event: "load". The "on submit" action of this form is then "Load Form" with "form_c", event: "load" and so on.

The chain of forms work in 'Test form'-view, but not in the regular Joomla view when called from the menu: Calling form_b from form_a works, but calling form_c from form_b doesn't, the form engine returns to form_a.

I tracked it already down that the itemid=213-param from the URL is "sticky", stays i the URL when the action-URL is generated and prevents the form engine to move further.

How can I achieve this multi form chain, please?
Gr GreyHead 25 Mar, 2016
Hi larsomato,

The ItemId is the menu ID - it isn't used by ChronoForms and won't normally affect the form loading.

Have you tried setting Relative URL to No in the HTML (render form) actions - that might fix this.

Bob
la larsomato 25 Mar, 2016
Hello GreyHead,

thanks for that idea - I tried that already, but it doesn't work. Strangely when I modify the action-URL of the form to the same value but without the itemId the form works fine.

having form_b open, the action-URL is
http://boese.localhost/index.php?option=com_chronoforms5&view=form&Itemid=213&lang=de&chronoform=choose_de&event=submit

(the menu-item 213 is the one of form_a). Submitting leads back to form_a, ignoring the events of form_b: there is a Event Switcher in the "On submit", and I just dropped a Debugger-Action in it before the Event Switcher - no reaction.

Now I change the action-URL to
http://boese.localhost/index.php?option=com_chronoforms5&view=form&lang=de&chronoform=choose_de&event=submit

(spoiler: only change is the deletion of the itemid) and after submitting the form_c is displayed.

Can I get rid of that itemId in the action-URL somehow? (changing it with JavaScript seems very dirty to me...)

Regards,
Lars
Gr GreyHead 25 Mar, 2016
Answer
Hi larsomato,

A couple of choices. The simple one is to pre-set the Action URLs - just copy and paste index.php?option=com_chronoforms5&chronoform=choose_de&event=submit into the Action URL box.

The second is more complex but tidier. You can create a series of hidden menu items - ones that don't appear on a visible menu - one for each form submission event. Call them e.g. form_b_submit then put the menu names in the Action URL boxes

Bob
la larsomato 25 Mar, 2016
Hi Bob,

first I tried the simple one - this didn't work, because joomla appended the itemid to the URL (SEO-friendly URLs were turned off at this point).

Now I managed it with the hidden menu-items, thank you!

Regards,
Lars
This topic is locked and no more replies can be posted.