Extend REST handler to support testing success value

Created on 3 June 2023, over 1 year ago

Problem/Motivation

I'm currently evaluating Webform Remote Handlers as I need to make webforms send data to remote systems, but I need it to check for success by comparing string values. The Response Boolean field expects a boolean in the response JSON, which won't work in our use case.

Steps to reproduce

  1. Create webform and webform handler
  2. Set Response Boolean field that maps to a string value in the response
  3. Try doing some submissions

Proposed resolution

I'd like to add an extra field to evaluate the result against, as a Select Or Other field; perhaps we could call it Success Value Comparison. It would contain a set of sensible defaults, such as boolean TRUE or 1 or whatever; an Other value would use token evaluation to build a value to compare against. The default value would map to a TRUE boolean to maintain compatibility.

Remaining tasks

  • Patch the module to support this change

User interface changes

A new

API changes

None.

Data model changes

The configuration for the REST webform handler would change to add an extra field for success value comparison.

Feature request
Status

Active

Version

3.0

Component

Code

Created by

🇦🇺Australia geoffreyr

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

Comments & Activities

Production build 0.71.5 2024