Skip to main content
Participating Frequently
Jun 19, 2021 1:42 AM UTC
Question

Spawn pages field names

Good morning!

I wonder if anyone here can help me...

I have three forms (submission) with various length, but all of them, once it has been filled, will be offering two resulution at the end of the form. These resolutions are going to open a new form (actually there are two of them), lets call it result forms.

The promblem I have is this.

Submission 1 has 4 pages; Submission 2 has 5 pages; Submission 3 has 3 pages.

When I launch Result 1 (spawn from the last page of the submission) the field names will change accordingly to P(the number follow whichever page from it is being spawned).form name.field name.

Now, on each pages I have various actiones, governed by Java Scripts, and obviousley they are not going to work because the spawn starting point is different for each pages, changing the field names. Further complicating the matter that I have a number of spawned templates inside both result forms.

Is there a solution to this problem?

I just hope my description of the problem is clear...

 

Many thanks!

This topic is closed to new replies. Start a new post to keep the conversation going.

12 replies

Bernd Alheit
Community Expert
Community Expert
Jun 19, 2021 7:08 AM UTC

You must change your scripts so it uses the correct field names.

Translate
Participating Frequently
Jun 19, 2021 10:42 AM UTC

Thanks Bernd!

I understand the field name structure's relevance.The issue here is that the same field name will have 3 different P number, pending where it is spawned from.

So if I set the field for a P number I thought I am goign to use the following argument:

if (event.value=="")

{execute with P4.F1.Field name}

else if (condition)

{execute with P5.F1.Field name}

else if (condition)

{execute with P6.F1.Field name}

It is just does not work.

Translate
Bernd Alheit
Community Expert
Community Expert
Jun 19, 2021 11:55 AM UTC

What want you execute?

Translate