Chirriras Posted March 23, 2004 Posted March 23, 2004 I have a rather long list of values that I am going to set up as radio buttons. Is there a way to display these in two columns (taking up less screen space) than in one long column? Thanks. Version: v6.x Platform: Windows 2000
guiseppe Posted March 23, 2004 Posted March 23, 2004 Resize the field. FM will change the number of columns automatically.
Garry Claridge Posted March 23, 2004 Posted March 23, 2004 You will need to use a little bit of Javascript for this: <table><tr> <script>i = 1 ; nCols = 3 ;[FMP-Record] if ((i % nCols) == 0) { document.write("<td>[FMP-Field:name]</td></tr><tr>") ; } else { document.write("<td>[FMP-Field:name]</td>") ; } ; i++ ;[/FMP-Record] </script></tr></table> This example is for three colums. Hope this helps. Garry
Chirriras Posted March 26, 2004 Author Posted March 26, 2004 Okay, Garry, remember you're dealing with a program illiterate here. Sample question: Field Name--HiDegree What is the highest degree you have earned? Response options: B.A. B.S. M.A. M.S. J.D. Ph.D. M.D. <table><tr><script>i = 1 ; nCols = 3 ; [FMP-Record]if ((i % nCols) == 0) { document.write("<td> [FMP-Field:HiDegree]</td></tr><tr>") ; } else { document.write("<td> [FMP-Field:HiDegree]</td>") ; } ;i++ ; [/FMP-Record]</script></tr></table> I think I missed something in the translatin again. Surprise!!
Garry Claridge Posted March 26, 2004 Posted March 26, 2004 Give this one a go <table><tr> <script>i = 1; nCols = 3; [FMP-ValueList: HiDegree, List=Degrees] if ((i % nCols) == 0) { document.write('<td><input type="radio" name="HiDegree" value="[FMP-ValueListItem]" [FMP-ValueListChecked]>[FMP-ValueListItem]</td></tr><tr>');} else { document.write('<td><input type="radio" name="HiDegree" value="[FMP-ValueListItem]" [FMP-ValueListChecked]>[FMP-ValueListItem]</td>');}; i++; [/FMP-ValueList] </script></tr></table> Good Luck. Garry
Steve T. Posted March 28, 2004 Posted March 28, 2004 Hi, E.D.! Using the ValueList is generally better so you don't have to change your web stuff if anything changes, but since your degrees list does not look like it would change much, you can also just hard code the radio buttons in a table if you like with any number of columns/rows you like. Make sure every button has the same name as the field but with different values and don't use the FMP-ValueList option at all. (Although Garry's JavaScript is awesome and I'm gonna copy/paste it into my code db... Thanx, GL!) --ST
Recommended Posts
This topic is 7615 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now