Repeatable Fields - is there a better way?

21 April, 2019 03:18:11
cwliew
Topics: 9
Messages: 32
I currently have a repeater setup in my Formidable form.
The way I have it setup is that the user will select a STATE, and then add a unique number, followed by a selection from a dropdown list associated with that unique number.
The selection in the dropdown field is only of relevant locations in the STATE that the user selected above. Meaning that all the other locations are not displayed. As there are 700 locations, this is a good way to ensure that only the relevant locations are displayed on the dropdown, saving the user time.
The issue comes into coding this on E2PDF.
When I add a field in E2PDF, I use the input field (which for example, I have called [field1]). Then as there are 6 states which are each labelled [field2] [field2] [field3] etc, meaning that for each PDF that I create, when I want to put the input field in the same spot, I have to overlay the field 6 times with 6 unique fields on top of each other. ie: [field1:1] [field2:1] etc. Then the next line down I want to use the next value in the repeater, so I have to enter again 6 fields on top of each other [field1:2] [field2:2] etc.

Is there a better way to do this? Ive attached a screenshot of one of such fields, where there are 6 overlapping fields, just to get the 1 answer.

Thanks again for all your help.
21 April, 2019 03:41:00
E2Pdf
Support
Topics: 7
Messages: 3163
Correct me if I'm wrong: You have 6 states and depending on user choice of state you have different Repeatable sections? Is it correct?

If so, you can try to create separate pages for each "state" and hide unneeded pages via "Actions" and "Conditions" based on user select. In this case you must avoid need to overlapse fields.

We remain at your service.


We would really appreciate your feedback at WordPress.org!
21 April, 2019 03:47:52
cwliew
Topics: 9
Messages: 32
Say the user selects State A. They are then presented with the option to write a unique number and next to that, select an option from the dropdown list which is unique to State A. They go on by clicking + to add more options. They will always stay in State A.
If another different user selects State B, they enter in their unique number, and then select an option from the dropdown list, but this list is unique to State B.

The option is then inputted into the same area on the output PDF. This means that their unique number goes in a box, and their selection from the dropdown list goes into another box. These boxes I have setup are all overlapped - with 6 fields on top of each other. This is not ideal. Any other options here?

I don't see the Option Cog in my version of E2PDF or Formidable forms, so Im assuming its somewhere else? I don't really understand your way around this. But am really grateful for your fast input so far. Any ideas?
21 April, 2019 04:03:25
E2Pdf
Support
Topics: 7
Messages: 3163
Check please screenshot below. Is this similar structure of your Formidable Form? If not can you please attach some screenshots of your form in same manner so I can understand the logic. Thank you.

We remain at your service.
We would really appreciate your feedback at WordPress.org!
21 April, 2019 04:07:28
cwliew
Topics: 9
Messages: 32
Very close. I have used sections in the same way.
I have 3 fields in each section.
Field 1 is a HEADER
Field 2 is in my example is the Provider number. This is where the user inputs their unique number.
Field 3 is a dropdown list of hospitals, unique to each state.
21 April, 2019 04:28:53
E2Pdf
Support
Topics: 7
Messages: 3163
Check please solution below. If I understand all correctly it must fit your needs. All values based on "example" Formidable Form above.

We remain at your service.
We would really appreciate your feedback at WordPress.org!
21 April, 2019 04:50:34
cwliew
Topics: 9
Messages: 32
My issue is with creating the mapped field in the E2Pdf. How can you show the dropdown fields without having to overlap the mapped fields on the output PDF?
21 April, 2019 05:02:39
E2Pdf
Support
Topics: 7
Messages: 3163
You can actually output "Dropdown" value to any fields or objects and combine them inside as E2Pdf works with final value. "Value" of any field or html/image object can be changed via "Right" mouse click -> "Properties" -> "Value".

If it's still different from what you need, can you please separate "overlapped" element from first message and make screenshot to see what it contains inside. Maybe like this it will be more clear to understand the problem.

We remain at your service.
We would really appreciate your feedback at WordPress.org!
21 April, 2019 05:21:32
cwliew
Topics: 9
Messages: 32
Yes, here is an example. I have only expanded 3 of the elements for each field. The field names are input_provider and input_hosp.
I seperate them by state by adding the state to the end. ie: input_providerqld2 and this matches with input_hospqld2

Then I overlap the output mapped fields on top of each other, so that input_providerqld2:2, input_providervic2:2, input_provideract2:2 are on top of each other, and input_hospqld2:2, input_hospvic2:2 and input_hospact2:2 are on top of each other.

It doesn't seem like the best way to accomplish this. Especially as I have to do this many name times, and it doesn't make sense that I can't accomplish this another way.
21 April, 2019 06:00:15
E2Pdf
Support
Topics: 7
Messages: 3163
The solution with pages in this case must work but here is easier solution as you are using pre-uploaded PDF. Still via "Actions" and "Conditions" you can change "field" value. So just detect which state and change "field" value depending on user choice.
[579] in this case is selected state by user and field value will be changed based on its choice. (Screenshot attached).

If you can't connect to "state" choice you can connect "if" to any other field or It can be also such condition: if [input_providerqld2:2] != "" then set value to [input_providerqld2:2].

We remain at your service.
We would really appreciate your feedback at WordPress.org!
21 April, 2019 06:05:13
cwliew
Topics: 9
Messages: 32
Thankyou for that. Seems like we are getting close. So to get this right, I have a list of options in a dropdown box in the Formidable forms. This list changes, depending on what state is selected. When the user has used the repeater field to add, for example, 3 numbers, linked to 3 different options from the dropdown box, then I can map these fields to INPUTS in the output PDF by using a single INPUT box and the actions and conditions you've shown there? That would be AWESOME if that worked.

Is this the same understanding that you have? BTW, thanks so much for your help so far.
21 April, 2019 06:28:12
E2Pdf
Support
Topics: 7
Messages: 3163
Yes, you are correct. In any case it's need to create correct logic and I'm almost sure that it's possible to accomplish with "Actions" and "Conditions".

In the example above it will work like this:

If user select "State 1" from dropdown list - he see first repeatable section (with field input_providerqld2) -> add first entry, add second entry. Via "Actions" and "Conditions" it detects that user selected "State 1" so it set "Value" of needed fields to [input_providerqld2:1] and [input_providerqld2:2] where needed and so on.

If user select "State 2" from dropdown list - he see second repeatable section (with field input_providervic2) -> add first entry, add second entry. Via "Actions" and "Conditions" it detects that user selected "State 2" so it set "Value" of needed fields to [input_providervic2:1] and [input_providervic2:2] where needed and so on.

and so on...

If it will still not work, you can create similar form with similar logic of your main form and upload "backup" here so we can just see your logic of form.

We remain at your service.
We would really appreciate your feedback at WordPress.org!
21 April, 2019 06:30:11
cwliew
Topics: 9
Messages: 32
Fantastic. I will try this tonight, and let you know how it goes. I have to commend you guys on your fantastic support. Ive never come across support as good as yours. Well done.
21 April, 2019 06:35:10
E2Pdf
Support
Topics: 7
Messages: 3163
Thank you.
We would really appreciate your feedback at WordPress.org!
21 April, 2019 20:27:26
cwliew
Topics: 9
Messages: 32
Tested and this works. I can't tell you how much you guys have saved me so much time. Thankyou so much. I am forever grateful! Keep up the great work. Thanks Oleksandr!