Multi-page form not working. '...not a valid selector'

Hello, I have created a multi-page form using these instructions:

I have followed it exactly and copied in the code (I’m naming the collection ‘Combined’ rather than ‘Contacts’). It seems to work up to the point where it should be combining the rows of the collection - so it successfully creates all three rows from each form page with the same formId but keeps them in three separate rows rather than collating it.

I don’t know if this is due to this but when putting the code into the site code (as specified in the how-to), I get an error saying #formIdInput isn’t a valid selector even though they exist on the pages. If I put the code into the page code instead, I don’t get the error but it still doesn’t work.

See screenshots below. Can anyone spot what I’m missing here?

Thanks!

When using Site code, you will get an invalid selector error on every page that the element is missing. Why not use it on the Page code as you say it works there.

You have two onReady() functions which is incorrect and can create inconsistent results.