Skip to main content Great design isn't just about how something looks--it's about how well it works for the people using it. Join us to see how thoughtful UX can become your most powerful support strategy in the AI era. Register now.

In my workflow I have an OpenForm to get user input. I am trying to create a field like this but keep getting internal server error. What I really want to do is allow the user to enter multiple reference Urls, each being an object { label: string, url: string }

 

{

referenceUrl: {

type: Schema.types.object,

properties: {

label: {

type: Schema.types.string,

title: "Category of any URLs that provide more context",

description: "Please enter a category for the URL",

},

url: {

type: Schema.types.string,

format: "url",

title: "URL related to above category",

description: "Please enter a URL related to the above category",

},

},

1 answer
  1. May 19, 2023, 2:33 PM

    The OpenForm step doesn't (currently) accept object types as a data type that it knows how to handle. I understand your intention, and it makes sense to me - I will raise this internally to see if we can get this on our roadmap to support objects as form fields (or at least, simple, single-level deep objects with simple types as properties).

     

    I think a workaround in the mean time would be to "flatten" the properties out of the object type into separate form fields: one simple string field for the reference URL label, and one URL-format string field for the reference URL itself. If you want to combine those two separate OpenForm output fields into a single object, I believe you'd have to implement a custom function to do that and add it as a step immediately following the OpenForm step. It could take all the outputs from the OpenForm step and format them appropriately as needed (e.g. combine into objects that suit your needs).

0/9000