Jump to content

Changing Fonts and Colors in paragraph


andym

Recommended Posts

Our client has a flyer with open text fields where they can put in multiple headers and paragraphs. The headers and paragraphs are specific fonts and colors, with a line break between each. What I came up with is showing the right color, font and spacing, but instead of their header value, it returns the field name. Here is what I have:

 

if (Field("Header One")== "" && Field("Paragraph One") == "")
return ""
else
return <color name="Light Blue"><f name="HelveticaNeueLT Std Med"> Field("Header One") </f></color> + "<br>"+ <color name="Black"><f name="HelveticaNeueLT Std Lt"> Field("Paragraph One") </f></color> + "<br>";

 

Instead of the header or paragraph value they submit, it returns "Field("Header One")" and " Field("Paragraph One")"(attached is a screenshot showing it is the right color and font, but not the value).

 

Am I missing a tag of some sort to return the value of the fields instead of the field names, or am I missing this all together in my approach?

 

Thank you for any guidance you can offer.

 

Andy

ScreenShot2016-01-18at9_00_43AM.png.52134f1745617b8501361b2033e760f4.png

Link to comment
Share on other sites

You just need to put your tags in quotes:

if (Field("Header One")== "" && Field("Paragraph One") == "")
return ""
else
return [color="Red"]'[/color]<color name="Light Blue"><f name="HelveticaNeueLT Std Med">[color="Red"]' + [/color]Field("Header One")[color="Red"] + '[/color]</f></color><br><color name="Black"><f name="HelveticaNeueLT Std Lt">[color="Red"]' + [/color]Field("Paragraph One")[color="Red"]+ '[/color]</f></color><br>[color="Red"]'[/color];

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...