dfalkowitz Posted December 1, 2016 Share Posted December 1, 2016 Hello! I was hoping someone would be able to help me create a numbered list within a Fusion Pro Javascript Rule? Sample HTML: <ol> <li>test1</li> <li>test2</li> </ol> Fusion Pro Output: 1. test1 2. test2 Is there a way to produce the FP Output within a Rule? Thank you! Quote Link to comment Share on other sites More sharing options...
step Posted December 1, 2016 Share Posted December 1, 2016 There are a number of ways to create a numbered list in FusionPro and none of them require HTML. I'm going to assume you're trying to accomplish something more complicated than the example you gave so I'll ignore the "why don't you just type the numbers in the text editor window" elephant in the room. Perhaps you have several fields that represent list items but you only want them to appear in the list if they have a value: var list = [ Field("ListItem1"), Field("ListItem2"), Field("ListItem3") ]; return list.filter(String).map(function(s,p){ return p + 1 + '. ' + s; }).join('<br>'); Or maybe you just want each item's indent to line up in the event that the text wraps. If that the case, you don't need a rule at all. Check out this thread: http://forums.pti.com/showthread.php?t=4075 Quote Link to comment Share on other sites More sharing options...
dfalkowitz Posted December 1, 2016 Author Share Posted December 1, 2016 Yes, you are correct - trying to accomplish something a little more complicated than manually typing the Numbered List. I guess I should have provided a little more details. What you provided was very helpful and is appreciated. Thank you so much!!! 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.