Forms Field type HTML Editor - Using local or global variables

Has anyone tried to embed local or global variables with in the form field type html editor. I have tried with no luck . I am assuming if though you i would need to use a php script within the html code to make this work. however i have not had any luck. Has any one ever tried this and succeeded?

Basically to keep it simple… This way it could be edited by a user on the front end of the system.

Hi {Name},

Here is a new promotion {promotion_name}. It starts from {date_start} to {date_ending}.

{company_name}
{employee_name}
{phone}
{email}

Thank you

in onload add some code like

{html_editor_field}='Here is a new promotion {promotion_name}. It starts from {date_start} to {date_ending}.

{company_name}
{employee_name}
{phone}
{email}’;

This can also be done in an ajax-event (like change of a dropdown) or via Javascript

@nonkelmike Thank you for the info. I understand what you are saying, but i do not get the output of the variables yet. Thank you tho for taking the time for your reply.

If you want that your users can edit the html field multiple times and always use the fieldnames as placeholder for the other fields content, I think you should:

  • Come up with your own syntax for the fields name placeholders (eg. !fieldname!)
  • Show this syntax somewhere in the form so that users know how to use it (if the other fields are on the same form as the html field, you could show it in the fields labels)
  • Render the parsed (by your code) version of the html field (i.e. with the fields contents shown) in another read only field

The Ticket system has an example with something similar to what you need.