Closed gaet592010 closed 4 years ago
Hi @gaet592010,
You can easily configure the default signer name and email in the bundle configuration. You will find everything you need about it from the documentation.
hi @vincentchalamon Thanks for the doc but .
How can i send the signer name/email in the url ? What URL ?
This bundle does not allow to set the signer properties from the url, you must use the bundle configuration. But you can use the multiple signature configuration and specify in the url which configuration to use:
# config/packages/docusign.yml
docusign:
default:
default_signer_name: "John DOE"
default_signer_email: "john.doe@example.com"
# ...
alternative:
default_signer_name: "Chuck NORRIS"
default_signer_email: "chuck.norris@example.com"
# ...
{# Resources/views/pouet.html.twig #}
<a href="{{ path('docusign_sign_default', {'path': document_to_sign}) }}">Use "default" configuration</a>
<a href="{{ path('docusign_sign_alternative', {'path': document_to_sign}) }}">Use "alternative" configuration</a>
I also recommend you to have a look at the TestBundle in the tests, which provides full dynamic examples of the implementation of this bundle.
As Vincent said: Two ways to approach things: First if there is only 1 signer, regardless the document sent, just put it in the configuration, that's it. You can also define multiple document configuration, and there you can have 1 signer per type of document.
Second, if you intend to have 1 signer per sent document, then you can send them in the URL
with the parameters of your choice. and use the addSigner
method from the enveloppeBuilder
inside an PreSignEvent
.
Second, if you intend to have 1 signer per sent document, then you can send them in the URL with the parameters of your choice. and use the addSigner method from the enveloppeBuilder inside an PreSignEvent.
:warning: The addSigner
method will currently add the signer to the default one, so you'll have 2 signers.
Maybe we should add the possibility to set a signer or a collection of signer (tuple of email and name) through the URL and in the CreateDocument
use them if they do exists instead of the default one.
WDYT ? @vincentchalamon @gaet592010
Or even better just use the PreSignEvent to add URL set signers, and detect the presence in the setDefaultSigners to prevent when there are already signers set. seems good. With a little doc enrichment :) of course
In fact, for my case i can use the addSigner
method in the PreSignEvent
but it will have 2 signer (the default signer + the signer added with the addSigner
).
Okay ?
If it's ok for you to have 2 signers, then you can use this solution. If you must have only 1 signer, you should use the multiple configuration solution.
We're currently working on a solution to set the default signer from the url, in a next release soon (days or weeks).
@vincentchalamon @GregoireHebert
Thanks for your supports.
I'll have 2 signers on my Docs until the next release
For the multiple Configuration, Can i add/edit the bundle's config programmatically ? For example i would like to create a config per customer in DB. It's possible ?
Hi !
I would like to change the default Signer Name / Email.
What's the best way to do this ? On PreSign ?
My goal is to have only One signer for the document Thanks for you reply