The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group

Slack Signup
Newsletter Optin
Help Desk

How to pass form Parameters when Conditional fields are used?

Labels

This Discussion is public

Notifications

Hi All - Formidable Pro user here for several years, and we love the plugin.

We have a 2-part form system, in which we pass the details to a partner API through a home-grown function/plugin I wrote. This works flawless for the most part, but we're extending our system and I have run into an issue passing data to the redirect URL, when using conditionals to show/hide sections of the form.

In our working system, we have 2 steps on specific pages that are geared to the topic/task/service:

  • Step 1 - Gather Zip Code [field123] and Service SubTask [field234]
    We then pass the values to our second form page in the URL: ourpage/z=[field123-value]&t=[field234-value]
  • Step 2 - We hide the form values in hidden fields (value=z, and value=t), and extract the rest of the information from the user in other form fields.
  • Step 3 - On submit, the APi kicks in and submits the user data through our system to the partner.

This all works just fine... but brings me to the issue I am having when we extend the tasks to their parent services.

  • Step 1 - Gather Zip Code [field123] and PARENT task [roofing]
  • Step 2 - When the users selects the PARENT task, a new dropdown appears based on a conditional dropmenu element, showing the SubTasks [Replace/Repair/Etc] of the parent, based on their selection. There are 20 or so subtask dropmenus on the page, set to hide/show based on the parent task.
  • Step 3 - The user would submit, and be redirected to the same page as above, with the form we use to submit the data through API.

The issue I have, is that depending on the Parent task, AND the Subtask, how can I build the URL for the redirect so it's always correct, and knows which of the hidden form fields was used to submit the subtask?

When building the redirect URL in the settings, I need: ourpage/z=[field123-value]&t=[field234-value], but the [field234-value] could be ANY of the shown/hidden subtask dropmenus.

Disregard - the solution to this is to use the form field conditionals, described here.
[if field234 equals="Option 1"][field234-value][/if 25]
[if field234 equals="Option 2"][field345-value][/if 25]

Etc

Discussion closed.