auto-populate fields with URL - multiple choice fields

Options
Kevin_579059
Kevin_579059 Posts: 67
edited August 2020 in Questions

Hello,

I like the auto-populate fields with URL's feature for webforms.

https://help.catalytic.com/docs/auto-populate-fields-with-urls/

However, I am finding that when there is a "Multiple Choice" field involved, it gets a little tricky.

I had an instance where I was trying to pre-populate the Multiple Choice field. If two choices are associated with a field in the URL, then on the webform generated from the auto-URL, those two choices are shown together in one "square" as per the following:

(Versus if the user selected the two choices on the webform not generated from the auto-URL, they would each appear in their own "square" with an X available to cancel each one.)

The problem that arises from this (the problem I am having) is if other fields/choices are dependent on these two individual choices, those other dependencies don't work, because of the way the two choices are grouped together.

To clarify, if the choices on the webform were apple, orange and pear, and if apple is selected, then another field further down (instruction field, for example) would "light up." So in the pre-populated URL, if apple and orange are associated with the fruit field, they are grouped together in one "square" and then the other field that is dependent on the apple choice does not activate.

I think I am even using the correct method for the condition, I am using Field Choice A "is in" Field XYZ, as opposed to Field XYZ equals Field Choice A.

So it seems like if a Multiple Choice has Field Choice A, Field Choice B, and Field Choice C, when the auto-URL is used, it is creating like a "new" choice with the comma in between, and the conditions do not recognize this.

I realize this is quite a unique scenario, but is there a correct way to build the URL to indicate two choices for a field?

If there is no way around this, then I will have to limit the auto-URL to fields that are not multiple choice, or at least multiple choice fields that do not have dependencies later on down the road.

thanks!
Kevin

Tagged:

Best Answers

Answers

  • Jozef_783863
    Jozef_783863 Posts: 331 admin
    Options

    @Kevin_579059 For your question quoted below, your URL should repeat the field name for each selected choice in that choice field.

    I realize this is quite a unique scenario, but is there a correct way to build the URL to indicate two choices for a field?

    Here is an example URL:

    https://teamname.pushbot.com/form/select-pair?field-select-pair=banana%20and%20pear&field-select-pair=apple%20and%20orange