Search code examples
zapierzapier-cli

Zapier form dynamic inputFields manipulation


I'd like to manipulate the input fields of a trigger form dynamically:

  • I have a trigger 'hidden' with a combo-box in a form
  • Each time I update the combo, it should add one or more combo-boxes in the same form depending on the value

I couldn't find any way to access the operation.inputFields somewhere for doing an update on this list dynamically, whether via the bundle or else...

Here is the small example: https://github.com/nuxeo-sandbox/nuxeo-zapier/blob/spikes-NXP-26085-zapier/nuxeo-zapier-app/triggers/project.js#L8-L16

Thank you for your help! Vlad


Solution

  • David here, from the Zapier Platform team.

    It sounds like you're looking for Custom Fields: https://github.com/zapier/zapier-platform-cli#customdynamic-fields

    In addition to a static list of input fields, you can provide a function that will run and provide a dynamic set of fields. It's how we get inputs for each column in a google sheet:

    Is that what you're asking? Modifying the inputFields array at runtime probably doesn't do what you want.