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.

selecting radio boxes activates text fields?

Featured Replies

  • Newbies

hello -- can someone please tell me how to have a radio box next to a text field that when i select the radio box the text field lets me type into it -- when it's not selected the text box is not active (greyed/faded or not visable?)

thank you in advance - JJ

This is pretty easy if you are familiar with self-links. You need to create a self-link, which is only activated if the radio button is marked, and then drop your text field into a portal.

Be careful! Your link-field needs a unique value for each record, or it will link to the wrong record. Here a small example:

Field name:

Record ID (a unique value for each record e.g. a serial number)

Radio (define this to include two values e.g. “Show” & “Hide”

Link (a calculation = Record ID & “Show” wink.gif" border="0

Link Calculate (Case (Radio = "Show"; Record ID & “Show”; "")

Now create a self-relationship between the fields Link and Link Calculation (call it “Show” for example)

Now drop a portal onto your layout, and select the relationship “Show”

Now drop the field text into the portal

Now drop the field Radio onto the layout and define it as a radio button field

If you mark “Show” you can enter text into “Text” within the portal. Mark hide and it disappears. You can now make the whole thing tidier by making the portal transparent.

Another good tip is to create another field (call it Show Button) and define it as a Text calculation:

Case (Radio = "Show"; “Hide Text Field” ; "Show Text Field" )

Now delete the old Radio field from the layout and paste the new “Show Button” field as a merge field into a button.

Now you need a script that switches “Radio” on and off

If

Radio = "Show"

SetField Radio “Hide”

Goto field Radio (or any other field)

Exit Script

End If

Now you have the following:

If “text” is visible, you have a button marked “Hide Text Field”

If “text” is not visible, you have a button marked “Show Text Field”

This is just a very basic idea – the possibilities are actually endless. However, one of the most powerful aspects of FMP is its ability to use self-relationships. Filemaker without relationships would just not be Filemaker, and self-relationships are essential. Learn them to really get the most from a solution.

PS: You could also include calculating containers to offer faded fields or buttons.

Hope this helped!

Rigsby

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.