Remote posting a Select field is not being sent in one field

Created on 9 March 2023, almost 2 years ago
Updated 12 April 2023, over 1 year ago

Problem/Motivation

When using the remote post option on a webform, the select field is not being sent as one field, rather multiple.

Steps to reproduce

- Introduce a select field on your webform
- Add a remote post submission handler
- Complete form
- For example the select field "test" will be sent as test[0], test[1] .. test[N-1] for how many options are selected
- Data is received as "test[0]": "optionselected1", "test[1]": "optionselected2"..

Proposed resolution

We have introduced a patch so that data will be received as one field seperated by commas, e.g.:
"test": "optionselected1, optionselected2"

Perhaps there can be an option to enable/disable this option for each select field, but the patch works.

Remaining tasks

-

User interface changes

N/A

API changes

N/A

Data model changes

N/A

✨ Feature request
Status

Closed: won't fix

Version

6.2

Component

Code

Created by

πŸ‡³πŸ‡ΏNew Zealand simon2d

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @simon2d
  • Status changed to Needs review almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    I am not sure this feature is required because there is a simple workaround using custom data and a token.

    The attached form sends the below data.

    form_params:
      select_b_commas: 'one, two, three'
      select_a:
        - one
        - two
        - three
      select_b:
        - one
        - two
        - three
  • Status changed to Closed: won't fix over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    Since #2 provides a reasonable solution, I am going to close this ticket

Production build 0.71.5 2024