DocuSign:如何在收件人选项卡中发送无线电组选择? [英] DocuSign: How to send a radio group selection in recipient tabs?

查看:107
本文介绍了DocuSign:如何在收件人选项卡中发送无线电组选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在模板中设置了无线电组,我想使用REST API预先填充这些标签。

I have radio groups set up in my template and I want to pre-fill these tags using the REST API.

请不要要求提供代码和/或请求/响应转储。我没有任何要显示的代码,我要这样做,因为它没有记录在案。我想知道我需要生成哪种JSON,所以这实际上与我的代码或编程语言无关。

Please don't ask for code and/or request/response dumps. I don't have any code to show and I am asking for this because it is not documented. I want to know what sort of JSON I need to be producing so this is really not about my code or programming language.

(此行下的任何内容都令人half舌,一半描述了我为该功能找到文档的失败尝试。如果其他人对我有完全相同的问题,这可能仍然有用。)

(Anything below this line is half rant and half describes my failed attempts at finding the documentation for this feature. It might still be useful if somebody else has the exact same problem with me.)

这里是我要使用的API的文档。有一个 textTabs 的示例,但这里甚至没有提到 radioGroupTabs 。在此处提及,但我不能从 null 中获得很多收益,显然我应该发送的不是null。

Here is the documentation for the API I am trying to use. There is an example for textTabs but radioGroupTabs is not even mentioned here. It is mentioned here but I can't make much out of the "null", obviously I should be sending something other than null.

继续,我可以在无线电组上找到的唯一有用的信息是有关如何在模板中创建它们的信息,它是此处。此页面也没有提及有关为收件人预先填充值的任何内容。但这是从此处链接的(请参见标签)。这里有一些信息:

Moving on, the only useful information I can find on the radio groups is about how to create them in a template, it's here. This page also doesn't mention anything about pre-filling the values for a recipient. But it's linked from here (see tabs) anyway. There is a bit of information here:

value: if an X, this is the selected radio button. Only one radio button in a group can be selected.

然后在此之前它说:

selected: Sets if this is radio button is selected. Use true/false to show the value is selected or not. Only one radio button can be true.

因此,我们了解到只有两种方法可以指定所选的单选控件。当然,这在您创建窗口小部件时适用。

So we learn there are only just two ways to specify a radio widget selected. Of course this applies when you are creating the widget.

尽管如此,我还是尝试发出请求,假设这也可以用于预填充,但我得到了以下有用的错误消息:

Nevertheless I tried to make requests assuming this would also work for pre-filling I got this helpful error message:

{
  "errorCode": "UNSPECIFIED_ERROR",
  "message": "Object reference not set to an instance of an object."
}

当我搜索支持论坛时,发现 ,这与我的问题并不完全相同,我很高兴能够设置错误的单选窗口小部件(而不是获取 UNSPECIFIED_ERROR ),但是这篇文章是关于XML API。

When I search the support forum I've found this, it's not exactly the same with my problem, I'd be happy to be able to set the wrong radio widget selected (as opposed to getting the UNSPECIFIED_ERROR) but this post is about the XML API.

我开始疯狂搜索新主题按钮,它的位置非常好,通常您可以在不到10分钟的时间内找到它。我记得我曾经去我的个人资料,然后在那儿单击。。。然后我做了每个有理智的开发人员都会做的事情,然后回到帖子URL并阅读了面包屑。 Dev区域部分已重命名为 Dev区域(移动到堆栈溢出-使用标记DocuSignAPI)。因此,我在这里。

I started my frantical search for the new topic button, it is so well placed you can usually find it in less than 10 minutes. I remember I used to go to my profile and then click something there... Then I did what every rational developer would do in the first place and went back to the post URL and read the breadcrumbs; Dev Zone section was renamed as Dev Zone (MOVED TO STACK OVERFLOW - Use tag DocuSignAPI). So here I am.

有人可以告诉这个功能在哪里记录,或者可以提供示例JSON?

Could anyone please tell where this feature is documented or maybe provide a sample JSON please?

推荐答案

您已找到如何创建单选按钮,不确定为什么您在使用该资源时会遇到麻烦。您已经提到了创建单选按钮标签而不发送它们的代码。这是不正确的-仅在请求的 status 属性从创建更改为已发送时,发送请求的请求正文才是完全相同的正文。

You've found the correct page for how to create radio buttons, not sure why you're having trouble using that resource. You've mentioned that's the code to CREATE the radio button tabs and not send them. That's not correct - the request body to send them is the same exact body only that the status property of the request changes from created to sent.

我刚刚测试过发送两个单选按钮,默认情况下第一个按钮处于选中状态,对我来说效果很好。这是我用于文档签名请求的完整请求正文,同样适用于您:

I just tested sending two radio buttons with the first button selected by default and it worked fine for me. Here is the full request body I used for my document signature request, this should work for you as well:

{
"emailBlurb": "Testing DocuSign radio buttons",
"emailSubject": "Custom PHP script",
"status": "sent",
"documents": [
    {
        "documentId": "1",
        "name": "test.pdf"
    }
],
"recipients": {
    "signers": [
        {
            "email": "john.doe@docusign.com",
            "name": "John Doe",
            "recipientId": "1",
            "tabs": {
                "signHereTabs": [
                    {
                        "xPosition": "100",
                        "yPosition": "200",
                        "documentId": "1",
                        "pageNumber": "1"
                    }
                ],
                "radioGroupTabs": [
                    {
                        "documentId": "1",
                        "groupName": "RadioGroup1",
                        "radios": [
                            {
                                "pageNumber": "1",
                                "selected": "true",
                                "value": "X",
                                "xPosition": "300",
                                "yPosition": "75"
                            },
                            {
                                "pageNumber": "1",
                                "selected": "false",
                                "xPosition": "350",
                                "yPosition": "75"
                            }
                        ]
                    }
                ]
            }
        }
    ]
}

}

此外,上面的示例使用绝对位置来定位在文档上的单选按钮上。在DocuSign中指定标签位置的另一种方法是使用所谓的锚标记。使用锚标记,而不是根据坐标系进行定位,可以相对于文档内容来定位选项卡。请查看以下两个链接以了解如何使用锚标记,切换到此方法非常容易:

To add to this, the above example uses absolute positioning to position the radio buttons on the document. The other way of specifying tab locations in DocuSign is by using what's called "Anchor Tagging". With anchor tagging, instead of positioning based on coordinate systems, you can you can position your tabs with respect to document content. Please see the following two links to learn how to use anchor tagging, it's quite easy to switch to this method:

锚定标签简介-查看标签定位部分

相关的堆栈溢出链接

这篇关于DocuSign:如何在收件人选项卡中发送无线电组选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆