Dynamically altering input fields in Zapier trigger forms

Hey folks, I’m trying to figure out how to change input fields in a Zapier trigger form on the fly. Here’s what I want to do:

  • I’ve got a hidden trigger with a dropdown in the form
  • When the dropdown value changes, I want to add more dropdowns to the form based on what was picked

I’ve been looking everywhere, but I can’t find a way to update the operation.inputFields list dynamically. I’ve tried checking the bundle and other places, but no luck so far.

Here’s a quick example of what I’m working with:

const triggerProject = (z, bundle) => {
  const inputFields = [
    {
      key: 'project',
      type: 'string',
      label: 'Project',
      choices: ['Project A', 'Project B', 'Project C'],
      altersDynamicFields: true
    }
  ];

  return inputFields;
};

Any ideas on how to make this work? Thanks in advance for your help!

Hey, ive done this before! u need to use the altersDynamicFields property on ur initial dropdown, then make a separate function for the dynamic fields. this function should check bundle.inputData.project and return an array of extra fields based on whats picked. in ur main trigger function, combine the static n dynamic fields. zapier will rerun the dynamic function when the dropdown changes. it can be tricky but its pretty cool once u get it working!

I’ve worked with dynamic fields in Zapier before, and here’s what I found effective: Use the altersDynamicFields: true property on your initial dropdown, then create a separate function for dynamic fields. This function should check bundle.inputData.project and return an array of additional fields based on the selection. In your main trigger function, combine the static fields with this dynamic function. Zapier will then re-run the dynamic function whenever the dropdown changes, updating the form accordingly. It takes some trial and error to get right, but it’s quite powerful once set up correctly. Remember to test thoroughly to ensure all field combinations appear as expected.

I’ve encountered a similar challenge with Zapier integrations before. The trick is to let the initial dropdown signal a need for dynamic fields by setting altersDynamicFields to true and then include a function that decides which additional fields to return based on the user’s selection. In practice, when the dropdown changes, your dynamic function should check the bundle details (like bundle.inputData.project) and append the appropriate field configuration. It may require some debugging to ensure the keys and logic are spot on, but once set up, it reliably updates the form on the fly.