March 24, 200322 yr Hi, I have a very simple database with just two fields: a username and a repeating field of dates, where the list of dates is a value list from a field in another database. This worked fine for inputting a new record, using checkboxes: [FMP-VALUELIST: thedate, LIST=thedate] <INPUT TYPE=checkbox NAME=thedate VALUE="[FMP-ValueListItem]">[FMP-VALUELISTITEM: Always, HTML]</FONT> [/FMP-VALUELIST] To edit the record, I can bring up the repeating field data as text fields using this: [FMP-REPEATING: thedate] <input type="text" name="thedate.[FMP-CurrentRepeatNumber]" value="[FMP-RepeatingItem]"><BR> [/FMP-REPEATING] ....but I can't figure a way to show and edit that field as check boxes. Help! regards, jeff
March 24, 200322 yr Will the work: [FMP-REPEATING: thedate] <input type="checkbox" name="thedate.[FMP-CurrentRepeatNumber]" value="[FMP-RepeatingItem]">[FMP-RepeatingItem]<BR> [/FMP-REPEATING] Good Luck. Garry
March 25, 200322 yr Author Hi, I've tried every combination i can think of and the nearest I get is to display all the options with the correct values, but I can only get the first checkbox selected ticked. This code: [FMP-VALUELIST: thedate, LIST=thedate] <INPUT TYPE="checkbox" NAME="thedate" VALUE="[FMP-ValuelistItem]"[FMP-ValueListChecked]>[FMP-VALUELISTITEM: Always, HTML]<BR> [/FMP-VALUELIST] delivers this: <INPUT TYPE="checkbox" NAME="thedate" VALUE="1/1/2003">1/1/2003<BR> <INPUT TYPE="checkbox" NAME="thedate" VALUE="1/2/2003"checked>1/2/2003<BR> <INPUT TYPE="checkbox" NAME="thedate" VALUE="1/3/2003">1/3/2003<BR> <INPUT TYPE="checkbox" NAME="thedate" VALUE="1/4/2003">1/4/2003<BR> <INPUT TYPE="checkbox" NAME="thedate" VALUE="1/5/2003">1/5/2003<BR> ...which is getting pretty close except it's only checking the first selection. I think maybe an "IF" kinda like: [FMP-IF:{FMP-ValuelistItem}.cn.Field:thedate]CHECKED[/FMP-IF] .....but that's not working yet :-( So as this is supposed to be a quick job, I've put it to one side for now and I'm using tokens and a portal to get the job running thanks, Jeff
March 25, 200322 yr Here is one from a page I used a few years ago: <tr> <td width="171" align="left" valign="top"><font face="Verdana" size="1"> <b>Languages<br></b><script> sFldValue = ""; [FMP-Repeating: languages] sFldValue = sFldValue + ":[FMP-RepeatingItem]";[/FMP-Repeating] [FMP-ValueList: languages, List= vlanguages] if (sFldValue.match(":[FMP-ValueListItem]")) {document.write('<input type="checkbox" name="languages" value="[FMP-ValueListItem]" checked>[FMP-ValueListItem]</option><br>');} else {document.write('<input type="checkbox" name="languages" value="[FMP-ValueListItem]">[FMP-ValueListItem]</option><br>');} [/FMP-ValueList]</script></font></td> <td colspan="2" align="left" valign="top"><font face="Verdana" size="1"> <b>Accents<br></b><script> sFldValue = ""; [FMP-Repeating: accents] sFldValue = sFldValue + "[FMP-RepeatingItem]";[/FMP-Repeating] [FMP-ValueList: accents, List= vlaccent] if (sFldValue.match("[FMP-ValueListItem]")) {document.write('<input type="checkbox" name="accents" value="[FMP-ValueListItem]" checked>[FMP-ValueListItem]</option><br>');} else {document.write('<input type="checkbox" name="accents" value="[FMP-ValueListItem]">[FMP-ValueListItem]</option><br>');} [/FMP-ValueList]</script></font></td> </tr> Hope it helps. Garry
March 26, 200322 yr Author Hi, thanks for that. This looks like it will look at the values and write the checked boxes Great stuff! thanks, jeff
Create an account or sign in to comment