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 Repeating Fields with CDML

Featured Replies

The title says it all... how do you using a form submission edit the contents of a repeating field?

Every time I try to edit the contents the pre-existing data is lost or overwritten.

I have a repeating field with the max set to 15. Some records have one entry, others have up to 7, how can I display and edit these records?

Right now I have a three stage form submission.

Page one edits a portion of the record then results to Page two, whose only function is to edit ONE repeating field and pass it to Page three, which is a final page.

I've tried:

In reply to:

<p><input type="text" name="directory" size="24" value="[fmp-field: directory]"></p>

<p><input type="text" name="directory" size="24" value="[fmp-field: directory]"></p>

<p><input type="text" name="directory" size="24" value="[fmp-field: directory]"></p>


but that doesn't work, it simply repeates the first item in the repeating field.

As a side note, I did not set this database up, I'm simply trying to clean up the mistakes of another developer. I try NOT to use repeating fields.

Time is a factor, so I am unable to remove the repeating fields and try a different method. The database has over 2,000 records with repeating field data.

Any suggestions would be appreciated. I simply have no experience with repeating fields, other than the reference database.

You might want to try something like this:

<form action="FMPro" method="post">

<input type="hidden" name="-DB" value="database.fp5">

<input type="hidden" name="-Lay" value="layout_name">

<input type="hidden" name="-Format" value="results.html">

<input type="hidden" name="-Error" value="error.html">

<input type="hidden" name="-RecID" value="[FMP-CurrentRecID]">

[FMP-Repeating:FieldName]

<input type="text" name="FieldName.[FMP-CurrentRepeatNumber]" value="[FMP-RepeatingItem]"><br>

[/FMP-Repeating]

<input type="submit" name="-Edit" value="Submit">

I haven't tested the above form myself, but I do know that you can edit multiple repetitions by appending .1, .2, .3, etc. to the end of the repeating field's name.

If the above doesn't work, eliminate the [FMP-Repeating]...[/FMP-Repeating] tags and hardcode each repetition, e.g.:

<input type="text" name="FieldName.1" value="[FMP-Field:FieldName:1]"><br>

<input type="text" name="FieldName.2" value="[FMP-Field:FieldName:2]"><br>

etc.

Let me know how it works out!

  • Author

Thank you so much for that info. I really appreciate it.

I found some content on FileMaker's site, after I posted, but I didn't know about the .1 .2 extensions, that will help out a lot!

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.