EricC Posted March 20, 2009 Share Posted March 20, 2009 I have a FusionPro template that I published to my printOne site. When the user personalizes this item he/she must enter some text into a multi-line text box. I want the user to be able to enter some text, press the tab key, and enter more text. However, as you can probably guess, when the user presses the tab key, the cursor moves to the next field in the form. Is there a way to allow the user to enter a <tab> while inside of a multi-line text box? Or... can I tell them to enter some special character (like the pipe symbol | and have a JavaScript Rule in my FusionPro template that analyzes the text that the user had input, and replace all of the pipe symbols with <tabs>? Link to comment Share on other sites More sharing options...
FreightTrain Posted March 23, 2009 Share Posted March 23, 2009 EricC, You can use a ReplaceSubstring function. In the example below the bar character (“|”) is the character indicating the tab space, but you could use anything including your example (<tab>) if you wanted: return ReplaceSubstring(Field("MyField1"), "|", "<t>"); Make sure the "Treat returned strings as tagged text" box is checked in the rule editor. You can even set up the tabstops in the text editor w/ correct distances and leader characters if applicable. Hope this helps Link to comment Share on other sites More sharing options...
EricC Posted March 23, 2009 Author Share Posted March 23, 2009 Thanks for the help! This field is actually a multi-line text box. 1. Does this make a difference? 2. Will the 'ReplaceSubstring' function replace ALL occurrences of the '|' character? Within that multi-line text box, the '|' symbol may appear 15 times. Thank you!!!! Link to comment Share on other sites More sharing options...
FreightTrain Posted March 23, 2009 Share Posted March 23, 2009 EricC, 1) No it should not make a difference. 2) As long as they don't need the character used as the replacement for the tab, it will work with as many instances as they need. Cheers Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.