I want to use a dropdown to populate a textbox with an email template. However I need to be able to use variables in the template. Ex. Hello {{customer.value}}
Default value for the text box would be {{selectTemplate.value}}
When I do this all the variables come across as code.
Is the customer, the name of the user using the application or is the customer value stored somewhere else? If it is stored somewhere else then you would need to select the customer value from another dropdown somewhere in the application unless you can get both the customer and the template at the same time and then transform the data to allow for one selection for the template and the customer....
The customer is stored in the same database in another table. This is a module so I have CustomerName setup as an input. But it shows the input as text and not as code in the textbox.
I got this working like so:
I used a temp state value and populated a rich text field with some example text and added in the customerName.value in it. Then added a name in customerName text component and it worked.....
But it's in a module and that module is in a app. the app contains the table so you have to reference it through the input. It appears the issue is related to escaping the quotes and getting the raw data. I've tried javascript to remove the quotes from the variable but that doesn't appear to work.