Jump to content

This topic is 7983 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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

This topic is 7983 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.