How to render Form directly into Page Template
Hello Community,
I have one page where user can download project pdfs. now instead of letting user download pdf directly. i want to display one form as a modal when user clicks on download link. this form contains body and and email field. it should send email with that pdf when user submits form. i want to use form because by doing that i can keep record of who submitted that form and see records on cms for using to marketing purposes in future.
I am new to email related functionality so i am also looking for how to define the email template for this which can configured from cms.
Environment
- Xperience by Kentico version: [30.0.0]
- .NET version: [8]
Answers
Sending an autoresponder email after a form submission is supported by XbyK without any customization. You just need to set up a couple of things. Below is a high-level outline with links to the documentation. I recommend spending some time reading and understanding the process yourself:
- Ensure your Email channel is configured: https://docs.kentico.com/developers-and-admins/digital-marketing-setup/email-channel-management
- You need to create an email template and an email content type: https://docs.kentico.com/developers-and-admins/digital-marketing-setup/email-templates
- In your Email channel, create a new email using the "Form autoresponder" purpose, along with the content type and template you created in the previous step. (Here’s an outline for a regular email, which is very similar to the autoresponder email: https://docs.kentico.com/guides/digital-marketing/work-with-email/create-a-marketing-email)
- While composing the email, make sure to link your PDF file.
- In your Form settings, go to the "Autoresponder" tab, select the "Select email" option and choose the autoresponder email you just created: https://docs.kentico.com/business-users/digital-marketing/forms/create-and-edit-forms#autoresponders
Regarding the modal that should display the form, this depends on your frontend implementation. Ensure that the form widget is rendered within HTML elements controlled by your CSS and client-side JavaScript to display as a modal.
To answer this question, you have to login first.