Same FORM twice in article - second not working

mbevc1

Member
Hi,

I have a long Landing page ... I have the same FORM inserted twice. This form is inserted into an article via {fabrik view=form id=1}.

The problem is that the second form (located at the bottom) does not work when I push button submit. I also noticed a strange behaviour. If I hover an element label the validation tooltip is displayed and then I click on the element the website scrolls in the upper form (and activates the cursor in the element).

I think it has to do with JS?

Any ideas how to insert same form twice into an article?

Fabrik 3.2
Joomla 3.3.3.
 
You can't use the same form with the same record (without record in your case) in an article. It's creating identical HTML ids which will break e.g. JS actions.
You can copy the list (which will create a new list/form/group/elements) and use this copied form.
 
You can't have the same form twice on a page, as it will produce conflictng HTML enttity ID's. Most notably, <from id="form_X" ...>, but also all the actual form inputs, which have the full element name as the ID, like <input id="tablename___elementname" ...>.

This is true regardless of how the two copies are rendered, whether it's a component link with a module, or an article plugin and a module, or two article plugins, etc.

-- hugh
 
Note that even if you copy the list, you can end up with duplicate ID's and weird behavior, as the copy only changes the form ID, it doesn't change any of the element ID's.

I was about to follow up and say you could try that, as it sometimes works, it depends on what element types and setting you have, as to whether you end up with clashes / unpredictable behavior or not.

-- hugh
 
Thank you for your help.

Which is the best way to create two forms in the same article. Should I create a new one with the same frontend layout ?

It will make sense also to populate the same list (from both forms)? Is this possible?

Best Regards.
 
I would suggest to copy your list and try.

Copying will give you a new list/form/elements with new list and form ids but although the new elements have new Fabrik ids there will still have identical HTML ids (table___element).
It won't help creating a new list linked to the existing DB table, this would have the same effect.

All those lists/forms will be linked to the same underlying DB table, so populating and reading the same data.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top