March 23, 200421 yr 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
March 23, 200421 yr 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
March 26, 200421 yr Author 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!!
March 26, 200421 yr 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
March 28, 200421 yr 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
Create an account or sign in to comment