Jump to content

Email Templates and links Query


lee mcdermott

Recommended Posts

@lee mcdermott

That's because the { and } are encoded as %7B and %7D when creating the link.

So, create the link as you need then click on "Source" button. This will display the HTML source for the template. In there it should be a line like:

<p><a href="mailto:test@test.com?subject=%7B%7B.H_pk_reference%7D%7D%20Approved&amp;body=email_body">Approved</a></p>

Replace the %7B and %7D with { and }, like this:

<p><a href="mailto:test@test.com?subject={{.H_pk_reference}}%20Approved&amp;body=email_body">Approved</a></p>

Save the changes.

Link to comment
Share on other sites

@Victor

 

hi victor that worked a treat thanks.

 

Ideally i was wanting to have a button rather than just a link. with the button doing the same thing i.e. generating a email

 

can the button option be used to send an email?

I see there are 3 options  of Button, Submit and Reset. I see the code as below but not sure what these options mean and if we could add he necessary code to send an email?

 

<input name="Approved" type="button" value="approved button" /></a></strong><br />
<br />
<input name="reject" type="submit" value="reject button" /><br />

Link to comment
Share on other sites

@lee mcdermott on top of my head, button can be used for this purpose, yes.  However, it requires HTML and JS coding which would be something we can't really advise on, is outside HB scope.

The "Submit" and "Reset" are not strictly buttons, they are HTML inputs, alongside "Button". They are presented as options because most likely they are seen as most used as input types for buttons by CK Editor (this is the editor component HB uses for areas like emails and email templates). However, the buttons are ultimately input HTML elements that can have a variety of types. Here is a more or less comprehensive list of input types: https://www.w3schools.com/html/html_form_input_types.asp. I also found this on Stackoverflow, describing how you can implement a button in an HTML page that will send an email: https://stackoverflow.com/questions/5773174/html-button-to-send-email. Please be aware we do not support any of the above so if you decide to implement a solution (such as button with a JS function) we won't be able to support it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...