Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

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.

Posted

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!

Posted

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!

This topic is 8292 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.