Variable {{site-name}} in SP PB "Form Builder add-on not working in mail body -SP PB V5.4.6 - Forum | JoomShaper
Solved SP Page Builder

Variable {{site-name}} in SP PB "Form Builder add-on not working in mail body -SP PB V5.4.6

Asked by Peter Hunkeler 1 year ago Last activity 1 year ago

The "Form Builder" add-on primes some of the email template data. The subject is set to

{{subject}} | {{site-name}}

which nicely shows the site the form has been sent from.

I'd like to use this variable in

  • The mail body
  • form field "Redirct URL"
  • form field "Recipient Email"
  • form field "From Email"

Usage in the URL, and Email fields would make is much more easier to prepare SP PB pages (using forms) on a dev site, and then move them to production by simple export/import. the correct URL would automatically be used ehrn redirecting the user after the mail was sent, as well as automatically sending the mail to the correct mailbox. No manual editing need after the export/import would make the process less error prone.

Accepted answer

Marked as the solution
Ziaul Kabir Staff

Hello Peter,

Thank you for your reply!

I completely understand how useful this feature could be for simplifying workflows when moving between development and production environments.

I’ll make sure to pass this suggestion along to the development team to consider adding it to the SP Page Builder wishlist for future updates.

If you have any other questions or need further assistance, feel free to let us know!

Thanks,

2 more replies

Ziaul Kabir Staff

Hello Peter,

Thank you for reaching out to us!

In the Form Builder settings, there is an option to set a Redirect URL, which will redirect users after the form is submitted. However, currently, in the email body, there is no built-in option to include the Redirect URL or From Email directly. These are already included in the header of the email in the Form Builder.

As for using variables like {{subject}} and {{site-name}} in the email body or fields like the Recipient Email or From Email, that functionality isn’t natively available at this time.

If you’d like to automate the process more easily, you may need to explore some custom coding or hiring a developer.

Is there anything else I can assist you with?

Thanks,

Peter Hunkeler Asked this

Hello Ziaul
thanks for responding.

Yes, I did set the redirect URL, and it does work. However, it seem this has to be a complete URL, such as https://mysite.ch. My desire is based on the fact that I'm preparing stuff on a development site, such as https://dev.mysite.ch. This way, I have to edit the field in the form before or after exporting from the dev site, and importing to the prod site.

If I could set the redirect URL to https://{{site-name}} this editing would not be needed.

With the same procedure in mind, I'd like to be able to use {{site-name}} in the mail body. Having this information in the subject doesn't look nice. If I could add this information in a footer line in the mail body, the information youd be there, but much less visible to the reader.

Finally, both my dev, and prod sites have mail servers running under their domain name, resp. So, forms sent from the dev shall go to the mailserver at dev.mysite.ch, whereas forms sent from the prod site shall go to mysite.ch.

Again, if I could use {{site-name}} in the mail adress fields, editing before/after import/export would not be needed.

I surely could find out how to do my custom coding, but I think this could be of use to many users. Maybe you can add this to SPPB wishlist?

Regards
Peter

Log in to reply.