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.

Changing multiple fields with one edit

Featured Replies

I need to have more than one field updated, without the user typing anything in a field, when a record is edited on the web.

I have a sort of message exchange database. I have four text fields called "question", "reply", "clarification" and "final response". Each one has it's own submit button. I need the form to both change the text fields and change the contents of a field called "status" behind the scenes.

Are you using Instant Web Publishing? You don't say. If you are doing Custom, what have you tried?

  • Author

I'm using Claris Home Page with FM 5.5. I'm a complete novice with CDML.

I'm trying to set this up so that every time someone updates a record, both the text field they typed in and a hidden "status" field is updated when they submit the form.

I figured out that I can put "hidden" input lines at the head of the page that will update any field I want. I created a new field "next status" that the form draws on. It moves the current value of "next status" to "status" when the form is submitted. A mail sending script running in the background updates "next status".

<INPUT TYPE=hidden NAME=status VALUE="[FMP-Field: next status]">

Now what I'd like to do is make it so the record detail page itself looks different depending on the value of "status". I would like to make it so that only the "response" field is editable when updating new records (where only "question" has been submitted). If both "question" and "response" are filled in, then only "clarification" should be editable, and so on.

You use the [FMP-If:] [FMP-Else] [/FMP-If] CDML tags to do this. Something like the example below, which are nested IF statements that allow three options.

code:


[FMP-If: status.eq.first]

lots of html and cdml for first status

[FMP-Else]

[FMP-If: status.eq.second]

lots of html and cdml for second status

[FMP-Else]

lots of html and cdml for third status

[/FMP-If]

[/FMP-If]

  • Author

That worked perfectly. Thank you very much!

Now I'm having a different problem. I'll start a new topic.

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.