Jump to content

selecting radio boxes activates text fields?


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

Recommended Posts

  • 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

Link to comment
Share on other sites

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


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!


Link to comment
Share on other sites

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