# Donation Ecard Configuration
# Requirements
- The field eCard - Send Checkbox must be added on the form. The scripts will automatically hide or show all ecard fields based on the checkbox.
- Ecard fields that need to be require must be configured to be as required only if sending an eCard in Luminate. This will ensure that Luminate renders the asterisks next to fields & not validate the fields when ecard is not being sent. The front end code will ensure that the required value is enforced only when the checkbox to send ecard is checked.
- Do not insert the field eCard - Preview Buttton, it will be hidden by the script. The custom preview will be automatically added into forms.
- The field eCard - Send Copy to Sender cannot be checked by default, it will throw errors for users who choose not to send an ecard.
# Image Replacement
By default, Luminate resizes the ecard image with a very old algorithm and puts the grainy image on the donation form. To improve the display, the scripts replace default Luminate images with a high fidelity ones. Replacement images must be placed into folder /wrpr/images/ecards/ on FTP. The image name must have a pattern ecard-${layoutId}.jpg where ${layoutId} is replaced with the id of the ecard stationery.
# Field Instruction Text
The instruction text can be customized for the message and recipients fields. To add instructions for those fields, just add an HTML caption field as the following field. The script will read the text that follows that field row, and insert it right after the field. This will apply to any donation pages that uses ecards, that is standalone ecards or ecards with tribute/honor gifts.
# Automated Card Selections
When a form is configured as a tribute form & contains ecards & tribute types (opens new window), the customized script will select an ecard based on the dedication type selected.
For this to happen the mapping has to be defined in reus_content_catalog in a script with the id donation-tribute-ecard. In the example below the values are set for production and test environments. The code must be in a valid JOSN format.
<script type="text/template" id="donation-tribute-ecard">
[[?Xsupport.savethechildren.orgX::X[[S29:DOMAIN]]X::
{
"memory": 1822,
"honor": 1821
}
::
{
"memory": 1502,
"honor": 1503
}
]]
</script>
# Ecard Preview
A custom preview was created for ecards. To enable preview the reusable page reus_ecard__preview must exist and be published. The page reus_ecard__preview must be modified to contain the email preview code for each layout id.
The code must accept the following URL parameters and incorporate them into the preview.
layout- used to render only the specific ecard/stationery layoutto- used to populate the recipientssubject- used to populate the subject linemessage- used to populate the message
Example code:
[[?x1821x::x[[S334:layout]]x::
<div class="donation-form__ecard donation-form__ecard--1821">
[[S51:reus_email__styles]]
<div class="content center-child"><strong>To:</strong> <span class="donation-form__ecard-to">[[S334:to]]</span></div>
<div class="content center-child"><strong>Subject:</strong> <span class="donation-form__ecard-subject">[[S334:subject]]</span></div>
[[S51:reus_email__header]]
<tr class="body-row">
<td class="body-content type background--white div--no-padding text--left">
<table class="body-content">
[[U0:eventImageAltText=Image of Chelsea in a tree smiling]]
[[U0:eventImage=https://[[S29:SECURE_DOMAIN]]/images/content/pagebuilder/ecard-1821.jpg]]
[[S51:reus_email__event_image]]
<tr>
<td valign="top" class="background--red text--left pad">
"When I grow up, I want to be a doctor", says 6-year-old Chelsea, who was born at the same Save the Chilren-supported health center in Kenya where her family recently welcomed her new baby sister.
</td>
</tr>
<tr>
<td class="body-content type background--white text--left pad">
<span class="donation-form__ecard-message">[[S334:message]]</span>
<br /><br /><br />
Save the Children believes every child deserves a future – and as global leaders in health, education and protection, we've changed the lives of over 1 billion children.
<br /><br />
The donation made in your honor will help support our work to give children in the United States and around the world a brighter future.
<br /><br />
Thank you for this meaningful gift.
<br /><br />
</td>
</tr>
</table>
</td><!-- /.body-content type -->
</tr><!-- /.body-row -->
[[S51:reus_email__footer]]
</table><!-- /.content -->
<!--[if mso]>
</td></tr></table>
<![endif]-->
</div><!-- /.container -->
</div><!-- /.donation-form__ecard -->
::]]