You need to sign in to do that
Don't have an account?
Embed line break in apex:outputtext in Visualforce HTML email template
I have looked and looked and can't find an answer to this problem. Any ideas?
I have a Visualforce HTML email template that uses apex:outputtext to render a number of fields conditionally, like this:
<apex:outputText value="Survey Name: {!relatedTo.Survey__r.Name}"
rendered="{!IF(relatedTo.Survey__r.Yes_or_No__c ='Yes', TRUE,FALSE)}"/><br/>
I have many such apex:outputtext statements in a row. Ideally, I'd like the <br/> behavior to be embedded inside the value string, so it is also rendered conditionally. Otherwise, if many of my fields are not displayed because of the value of their rendered attribute, I get a lot of extranous blank space in my generated email.
I would like to be able to do something like:
<apex:outputText value="Survey Name: {!relatedTo.Survey__r.Name}\n\r"
rendered="{!IF(relatedTo.Survey__r.Yes_or_No__c ='Yes', TRUE,FALSE)}"/><br/>
Can anyone help?
Thanks in advance!!!
I have a Visualforce HTML email template that uses apex:outputtext to render a number of fields conditionally, like this:
<apex:outputText value="Survey Name: {!relatedTo.Survey__r.Name}"
rendered="{!IF(relatedTo.Survey__r.Yes_or_No__c ='Yes', TRUE,FALSE)}"/><br/>
I have many such apex:outputtext statements in a row. Ideally, I'd like the <br/> behavior to be embedded inside the value string, so it is also rendered conditionally. Otherwise, if many of my fields are not displayed because of the value of their rendered attribute, I get a lot of extranous blank space in my generated email.
I would like to be able to do something like:
<apex:outputText value="Survey Name: {!relatedTo.Survey__r.Name}\n\r"
rendered="{!IF(relatedTo.Survey__r.Yes_or_No__c ='Yes', TRUE,FALSE)}"/><br/>
Can anyone help?
Thanks in advance!!!
All Answers
This might work also: