dfalkowitz Posted January 26, 2011 Share Posted January 26, 2011 Does anyone know how to bold a variable field in a Javascript rule? I know how to do it to plain text "<b>Hello</b>" but can't figure it out for variable fields... Quote Link to comment Share on other sites More sharing options...
FreightTrain Posted January 26, 2011 Share Posted January 26, 2011 dfalkowitz You are on the right track, it uses the same tag. You do need to check the box above the scripting area that says "Treat return strings as tagged text" for it to work. return '<b>'+Field("yourfieldname")+'</b>'; For more info about the use of formatting tags in FPD, review the Tags Reference guide: FusionPro menu > Documentation > Tags Reference Hope this helps. Quote Link to comment Share on other sites More sharing options...
dfalkowitz Posted January 26, 2011 Author Share Posted January 26, 2011 Perfect - Thanks!!! Quote Link to comment Share on other sites More sharing options...
rrdwitt Posted February 26, 2018 Share Posted February 26, 2018 How about bolding a field within a line of text. This line is giving me a error. Thanks return "<span>" + RawText("To make your gift via mail, please complete the form below and return it with the envelope provided. You may also visit us at " '<b>'+Field("yourfieldname")+'</b>'; "to give online."); + "</span>"; Quote Link to comment Share on other sites More sharing options...
David Miller Posted February 27, 2018 Share Posted February 27, 2018 How about bolding a field within a line of text. This line is giving me a error. Thanks return "<span>" + RawText("To make your gift via mail, please complete the form below and return it with the envelope provided. You may also visit us at " '<b>'+Field("yourfieldname")+'</b>'; "to give online."); + "</span>"; You might try this instead: return '<span> To make your gift via mail, please complete the form below and return it with the envelope provided. You may also visit us at <b>' + Field("yourfieldname") + '</b> to give online. </span>'; Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted February 27, 2018 Share Posted February 27, 2018 You could also just make a Formatted Text Resource, and specify the variables and formatting in the Text Editor, and return the resource from a rule. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.