Skip to main content
Question

Dynamic field with multiple select option.

  • December 8, 2022
  • 1 reply
  • 363 views

I want to display in  zapier Action dynamic field tag list , So User can select multiple tag from tag list.
Right now user can select only one tag.
My code is as below: 
 return z.request(options)
    .then((response) => {
      response.throwForStatus();
      const result = z.JSON.parse(response.content);
      results=result.data;
     // z.console.log(results)
      const field = { key: 'tag_id',label:'Tag List',choices: results.map(item => {
  return {
    value: item.tag,
    label: item.id,
    
  }
}) }
      return field;
    });

Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

shalgrim
Forum|alt.badge.img+8
  • Zapier Staff
  • 406 replies
  • December 11, 2022

Hi @makedreamsatul!

The best way to do this is to provide each tag as its own field and let the user select as few or as many as they want in the user interface, then, before sending them to the API, if the API requires them to be the same field, you can collect them into, say, a comma-separated list before sending them as one field to the API.

Hope that helps!