davers Posted May 9, 2012 Share Posted May 9, 2012 Hi, Is there a way FusionPro can recognize a hard/soft return in a Field and ignore it? The Field is a multi-line field type. We have formatted the data in the Field to break in 2 lines (after the first "of"), but if the user hits <enter> while typing the info, the data will output an extra break. Example of the correct format is: Doctor of Psychology But when the user hits <enter> themselves after the "of" we get an extra line break Doctor of Psychology Thanks for all the help! This Forum has been invaluable! Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted May 9, 2012 Share Posted May 9, 2012 Exactly where is the user doing this typing? In MarcomCentral? A different Web-to-Print site? Or is this just in Excel or some other flat file text editor? Quote Link to comment Share on other sites More sharing options...
davers Posted May 9, 2012 Author Share Posted May 9, 2012 Hi Dan, The user types in the data on EFI Digital Storefront website Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted May 9, 2012 Share Posted May 9, 2012 The user types in the data on EFI Digital Storefront website Then you'll need to ask EFI how their web application handles a "soft return" typed by the user into one of its web forms. Ideally, it would turn this into a <br> tag for FusionPro instead of a <p> tag. That's what the Variable Text Editor dialog in FusionPro VDP Creator (Desktop) does when you type Shift+Enter. Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted May 9, 2012 Share Posted May 9, 2012 Actually, re-reading the original question, the DSF is presumably already placing either a <br> or <p> tag into the field data. So you could just strip these out with a simple JavaScript rule, like so: return Field("Your Field Name").replace(/<br>|<p>/gi, " "); Although I think it's probably easier to use a single-line field if you really don't want the user to type embedded newlines. 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.