首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何在zapier平台上制作动态字段?

如何在zapier平台上制作动态字段?
EN

Stack Overflow用户
提问于 2019-06-28 17:49:12
回答 1查看 912关注 0票数 1

我想在Zapier平台上创建动态字段。如果用户选择“是”,则显示4-5个字段,否则不显示。我在ZOHO CRM集成where only 2 fields are shown at first中见过这种类型的示例。

现在只有2个字段。当我们在第一个字段中选择“标准”时,会显示/打开许多字段。Here are all the fields that show up

与此类似,我想要一个字段,其中有两个选项,“是”和“否”。如果用户选择是,则应打开4-5个字段(否则不会打开)。用户可以使用这些字段发送数据。

EN

回答 1

Stack Overflow用户

发布于 2019-06-29 02:34:34

这里有关于这个过程的文档here (复制如下)

代码语言:javascript
运行
复制
const recipeFields = (z, bundle) => {
  const response = z.request('http://example.com/api/v2/fields.json');
  // json is is [{"key":"field_1"},{"key":"field_2"}]
  return response.then(res => res.json);
};

const App = {
  //...
  creates: {
    create_recipe: {
      //...
      operation: {
        // an array of objects is the simplest way
        inputFields: [
          {
            key: 'title',
            required: true,
            label: 'Title of Recipe',
            helpText: 'Name your recipe!'
          },
          {
            key: 'style',
            required: true,
            choices: { mexican: 'Mexican', italian: 'Italian' }
          },
          recipeFields // provide a function inline - we'll merge the results!
        ],
        perform: () => {}
      }
    }
  }
};

在本例中,您将用yes/no替换style字段。recipeFields函数将有一条if语句来检查bundle.inputData.style的值,并返回更多的字段对象或[],这取决于是否应该显示更多的字段。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56804655

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档