Open chrisman opened 6 years ago
Summary:
I don't think it's possible to create a required field. But we could work around that by making required fields in our Form that are then used to populate the API call.
Creating a custom field might be a little complicated. It looks like we'll need to create the card, and then get the ID of the card back from Trello. Then use the ID of the card to add a custom field to it.
curl -X POST -H "Content-Type: application/json" \
https://api.trello.com/1/customFields \
-d '{
idModel: "5a00adcebe1991022b4a4bb4",
modelType: "board",
name: "My Dropdown",
options: [,
{
color: "none",
value: {
text: "First Option"
},
pos: 1024
},
{
color: "none",
value: {
text: "Second Option"
},
pos: 2048
}
],
pos: "bottom",
type: "list",
display_cardFront: false
}'
Also, I couldn't find a conclusive way of making an API call for attachments. I do think it's possible, but I need to play with the code some to test it. In the mean time, it also looks like we can make cards via email, and the attachment process on that is SUPER simple. Email doesn't offer anywhere near the level of robust options we need, but it is super cool...
[x] Can fields be required when creating a card?
[x] Create a custom field (for capturing arbitrary data in a webhook)
[x] How to make an API call for attachments?