Jump to content

Access template fields in CKEditor


Typografics
 Share

Recommended Posts

Good morning,

A few years ago we created a module so a registered user can be accepted or rejected. When the user fully succeeds the registration, the administrator will receive an email. We can choose the parameters for this email in a CKEditor field.

It works perfectly for text fields, but it does not seem to work for a select field. The professional_activity field is a select field and in the email it only shows the index of that value and not the title (screenshot1). Is there a way I can choose to show the title instead of the index? You can see the values in screenshot 2.

I already tried {professional_activity->title} and {professional_activity.title} and they both do not work.

Does anyone know a solution to this?

Kind Regards,

Elke

Screenshot 2020-05-29 at 09.50.03.png

Screenshot 2020-05-29 at 09.53.06.png

Link to comment
Share on other sites

Not really a direct answer to your issue, but using HannaCode could be a solution. Another approach, I don't know how your custom module works, but you could achieve it by extending your module or coding a little custom TextFormatter.

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

Unfortunately the HannaCode module was not the solution.

 

However I was able to fix it by looping through the data of all the registration fields before it is being sent to the "sendMail" function.

This way I could overwrite the label/value/title of the selected item, the same way you would echo this value in a template and send this back to the sendMail function.

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...