- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 8:45am 9 May 2023 - 🇫🇷France mchamps Finistère
Thanks for the patch but it is not working.
I create an email handler and add the token in the message > body part.
It does appear in the list of available tokens :
Calendar links calendar_links Tokens to embed calendar links.
Parameters [calendar_links:parameters:?] Embed calendar links using tokens. The following values may be appended to the token: calendar_links:parameters:start|end|title|description|locationWhen i use the tokens to display the values it works [webform_submission:values:date_d_arrivee] or [webform_submission:values:date_de_depart].
I tried with only one token : [calendar_links:parameters:message]
The email message displays the tokens, not the valuesI ran composer require spatie/calendar-links to install it.
I went to /web/libraries to check and the library calendar-links does not appear. Would it be in a subfolder?
I downloaded and extracted the code directly from GitHub : wget https://github.com/spatie/calendar-links/archive/refs/heads/master.zip
Used drush cache-rebuilt
No luck either - 🇯🇵Japan eleonel Itoshima 🇯🇵
Hi, are you replacing the
nid
with the real number in the token? example[calendar_links:parameters:123|date_d_arrivee|date_de_depart|title_field|message]
- 🇫🇷France mchamps Finistère
Nope I did not, this time.. I though is was working with the current submission.
I'm working with email handlers...Here's what I've just tried :
-- The title of the submission is : Booking form: Submission #514
So I tried with [calendar_links:parameters:514|date_d_arrivee|date_de_depart]
-- The URL of the submission is : /admin/structure/webform/manage/reservation_form/submission/545
So I tried with [calendar_links:parameters:545|date_d_arrivee|date_de_depart]I tried again [calendar_links:parameters:nid|date_d_arrivee|date_de_depart]
None worked.
Why would I have to replace the nid with the real number of the token?
Then I would need to do it for each webform submission?Thanks for your help & suggestions.
- 🇫🇷France mchamps Finistère
I have read your examples, a few times, and read your documentation also https://www.morpht.com/blog/announcing-calendar-links-token-module
It is obviously not clear or easy to understand for me... sorry.I run a BnB and I would like to use your module with my booking webform. I found the link for it in /admin/structure/webform/addons.
My idea is to send an automated email, once I have validated the booking, with the links to add the booking to my Google calendar on Thunderbird.
I have create an email handler /admin/structure/webform/manage/reservation_form/handlers
For the body, I selected "Custom body..." and added your code to it : [calendar_links:parameters:nid|date_d_arrivee|date_de_depart|nom|message|formules]In my form
date_d_arrivee : Date field for arrival
date_de_depart : Date field for departure
nom : Text field for the title
message : Textarea for description
formules : Entity radio to pick which room they wantThe body of the email handler is :
[webform_submission:values:date_d_arrivee] to [webform_submission:values:date_de_depart]. [calendar_links:parameters:nid|date_d_arrivee|date_de_depart|nom|message|formules]
When I validate the booking, I receive the email
12/12/23 to 16/12/23.
[calendar_links:parameters:nid|date_d_arrivee|date_de_depart|nom|message|formules]How do I get the nid of the submission ?
I tried with the number in the URL /admin/structure/webform/manage/testing_booking_form/submission/547/edit
as I would do for a node.How can I get it to work with the current submission ?
Thanks for your time and explanations.
Have a good one - 🇫🇷France mchamps Finistère
I've just added this token to the email handler's body : [webform_submission:node:nid]
I receive the email with [webform_submission:node:nid] instead of its value.
So I guess the webform submission does not have an nid in this case... - Status changed to Closed: works as designed
over 1 year ago 11:56pm 19 June 2023 - 🇯🇵Japan eleonel Itoshima 🇯🇵
[calendar_links:parameters:nid|date_start_field|date_end_field|title_field|description_field|location_field]
nid is the id of a node with fields date_start_field, date_end_field, title_field, description_field and location_field, not the webform id or submission id
This module doesn't use the webform as source to fill out the fields used in the token, it use a node, and you need to specify which node by entering the correct nid, like my examples on #5 🐛 Does not work Closed: works as designed
- 🇫🇷France mchamps Finistère
Thanks for making it all clear.
You might want to remove this module from the Webform add-on page as it does not use the webform as a source. /admin/structure/webform/addons.