tbone56 Posted January 14, 2011 Share Posted January 14, 2011 (edited) Can somone tell me how to get a Text Frame to be shown or hidden based off of a value in the data sheet? For instance: if the value was "On" then the Text "This is what is in my text frame" would appear. Vice versa. I have seen the text switch rule but the text in my frame is formatted a cerain way and not just straight text. Thanks ahead of time. Edited January 14, 2011 by tbone56 Quote Link to comment Share on other sites More sharing options...
tbone56 Posted January 14, 2011 Author Share Posted January 14, 2011 I think I might have figured it out but I if someone knows how, I would like to make sure I am doing it correctly. Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted January 14, 2011 Share Posted January 14, 2011 If you want to hide the entire text frame, just do this in OnRecordStart: FindTextFrame("YourTextFrameName").suppress = true;Or, if you only want to suppress some specific text, put it in a Formatted Text Resource and apply any formatting you want to it, then have a rule (either JavaScript, Switch Wizard, or Drag-and-Drop Wizard) which conditionally returns either that resource or an empty string. Of course, you can always apply the formatting through tags as well, something like this: return '<f name="Arial"><z newsize=20><color name="Red">This is what is in my text frame';You can also apply formatting in the Drag-and-Drop Rule Wizard. So there are lots of ways to accomplish this; you can pick whichever one is right for you. Quote Link to comment Share on other sites More sharing options...
Marlonw12 Posted March 15, 2013 Share Posted March 15, 2013 FindTextFrame("YourTextFrameName").suppress = true; Am I missing something? I did this and it works but to show the text frame I have to physically write "false". I'm trying to make it a yes/no radio button the user selects. Also, what is the best method of making the text or text frames flow, so if I hide one text frame the other moves up or down and not leave a gap? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted March 18, 2013 Share Posted March 18, 2013 FindTextFrame("YourTextFrameName").suppress = true; Am I missing something? I did this and it works but to show the text frame I have to physically write "false". I'm trying to make it a yes/no radio button the user selects. Right, if you say "true", then the frame is suppressed. If you say "false", then the frame is NOT suppressed. Although you can specify any value that evaluates to a Boolean (true or false). Also, what is the best method of making the text or text frames flow, so if I hide one text frame the other moves up or down and not leave a gap? If you want to do that, you don't need to suppress any frames at all. Just have a rule which returns either the first part of the text, or nothing at all, and insert that rule into the text frame, above any other text. If the rule returns nothing, the rest of the text will "move up" to the start of the frame. Quote Link to comment Share on other sites More sharing options...
Marlonw12 Posted March 19, 2013 Share Posted March 19, 2013 Hi Dan, worked on this all weekend and I'm making good progress thanks to you. Still having some issues with text flowing right. Quote Link to comment Share on other sites More sharing options...
tflan56 Posted August 25, 2013 Share Posted August 25, 2013 I was reviewing this thread and having the similar issue. Can someone further explain how to make your text frames will "move up"? If you want to do that, you don't need to suppress any frames at all. Just have a rule which returns either the first part of the text, or nothing at all, and insert that rule into the text frame, above any other text. If the rule returns nothing, the rest of the text will "move up" to the start of the frame. I have a highly variable form that needs to move up when data fields are left empty. Quote Link to comment Share on other sites More sharing options...
esmith Posted August 26, 2013 Share Posted August 26, 2013 I was reviewing this thread and having the similar issue. Can someone further explain how to make your text frames will "move up"? FusionPro does not support "flex" (as you named it in a separate thread). Instead, you would put all your text in a single frame, but generate the contents of the frame with a rule which builds the contents and returns only what is needed to display. If 'name' does not have a value, the rule could ignore it (and any associated static text) and begin contents with 'address'. In 8.x you have the ability to change frame position via JavaScript which might work to suppress/move related frames. I'm not sure that's applicable or worth the time in your scenario though. 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.