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 8414 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I am relatively new to CDML ...

I have a parent record and some related records in a portal on a web site. I have put the editable fields of the parent record in a form. I would like also to let the user add a new child record in the related file, then be presented with a form to edit the remaining contents (in other words, create a new record in the child file with the related field filled in and maybe one other).

Make sense to anyone? Any advice? Need I clarify? Thanks in advance.

Jeff Simpson

[email protected]

Posted

Here is one we use for payment details during a photo shoot:

<b>Payment Details:</b><br><table><tr><td><b>Type</b></td><td><b>Card ID</b></td><td><b>Amount</b></td><td></td></tr>

[FMP-Portal: payment]

<tr><td>[FMP-Field: payment:: pay_type]</td><td>[FMP-Field: payment:: pay_cardid]</td><td>$[FMP-Field: payment:: pay_amount]</td><td></ td>

</tr>[/FMP-Portal]<tr><td></td><td></td><td>$[FMP-Field: payments_tot]</td><td><b>Total Payments</b></td></tr>

<tr><td><b>Select Payment Type:</b></td><td></td><td></td><td></td></tr>

<tr><form name="paymentfm" action="../FMPro" method="post">

<input type="hidden" name="-db" value="rmr_payment.fp5">

<input type="hidden" name="-lay" value="allfields">

<input type="hidden" name="-format" value="/pages/photo_payret.html">

<input type="hidden" name="-token" value="[FMP-Field:key]">

<input type="hidden" name="shoot_id" value="[FMP-Field:shoot_id]">

<input type="hidden" name="code" value="[FMP-Field:code]">

<td><select name="pay_type">

[FMP-InlineAction: -db=rmr_payment.fp5, -lay=allfields, -view]

[FMP-Option: pay_type, List=payment_types][/FMP-InlineAction]

</select></td>

<td><input type="text" name="pay_cardid" value=""></td>

<td>$<input type="text" name="pay_amount" value="0" size="10"></td>

<td><input type="submit" name="-new" value="Add Payment"></td></form></tr></table><br>

Hope it makes sense.

Garry

[ January 16, 2002: Message edited by: Garry Claridge ]

  • Newbies
Posted

Thanks Garry!! FYI, I am using FMP4 - but I got the idea.

Now, I am using this link (or its form equivelent)

<a href="FMPro?-DB=TestChild.fp3&-Lay=CDMLList&-Format=child_detail.html&TextField=Test From Link on [FMP-CurrentDate] at [FMP-CurrentTime] &IDRef_Parent=[FMP-field: ID_Parent]&-New">

and it adds the child record ok, but the results page (child_detail.html) doesn't have the new data. If I go to an intermediate page then have the user use this link:

<A HREF="[FMP-linkrecid: layout=CDMLList, format=child_detail.html]">

it works fine, but I'd like to get rid of the intermediate step

Any Ideas??

Jeff Simpson

[email protected]

  • Newbies
Posted

I have done it with a portal and a script. When the visitor add a new record to the database a script runs and copy the text of the parent record and then paste it in the portal of the childe filed of the child file. Then you have created a new record in the child file.

/Peter

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