Skip 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.

Adding a relate record (Portal-like?)...

Featured Replies

  • Newbies

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]

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 ]

  • Author
  • Newbies

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

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

Script? What if another user will run that script in the same moment, simultaneously? Which will take over?

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.