Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Editing a repeating field

Featured Replies

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

Will the work:

[FMP-REPEATING: thedate]

<input type="checkbox" name="thedate.[FMP-CurrentRepeatNumber]" value="[FMP-RepeatingItem]">[FMP-RepeatingItem]<BR>

[/FMP-REPEATING]

Good Luck.

Garry

  • 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

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

  • 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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.