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

Container as Radio Button...?

Featured Replies

Is it possible to use a container field as a sort of single radio button?

What I mean by this is; I currently have calculated fields to show a 'star' rating - 0 to 5.

I use a drop-down for the initial number and this is then translated via a container (6 global) to show a graphic of corresponding 'stars'

What would be cool is to just click the container and let the 'stars' advance until you reach the desired 'rating' - any ideas?

Thanks in advance!

Frank.

Okay, i didn't catch a lot of how you're doing it at the moment, but I'd use three fields and one script to acheive this...

First Field, Repeating Global Container Field, 6 repetitions.

Rep 1 stores image for zero stars, Rep 2 stores image for one stars etc up to six.

Second Field, Rating -- Just a number field.

Third Field, Calculation, result container, calculation being: firstField[secondField]

Finally, the script that you can attach to your third field i.e. your container:

Set Field[ SecondField ;

Case( SecondField = 6 or IsEmpty( SecondField ) ; 1 ; secondField + 1 )

]

Commit Record/Request[]

Edited by Guest

  • Author

Something like this?

EXACTLY like that! Many thanks!

Thanks also to Genx, although your solution (in print) went over my head a little...

Frank.

Edited by Guest

  • Author

...Just one slight problem - my 'stars' start at zero and go through to 6 (not 1 - 5), this throws evertyhing out by 1, the zero seems to be invalid(!)

Frank.

Here's another way, you can then modify the calculated icon field to select different containers if you wish via the choose command.

Rod

RatingCalc.fp7.zip

  • Author

Here's another way, you can then modify the calculated icon field to select different containers if you wish via the choose command.

Rod

Thanks!

This is (vitually) the same as my orginal set-up (Radio Buttons instead of hi-lite buttons though)

Frank.

Sorry did not read close enough, here's what I think your looking for.

Rod

RatingCalc_2.fp7.zip

  • Author

Sorry did not read close enough, here's what I think your looking for.

Rod

Thanks Rod! Near-perfect - my first rating needs to be zero (5 stars blanked), using a zero in the calc doesn't seem to work though...

Maybe I need something like ?

Frank.

Edited by Guest

Have you thought about trying to modify one of the example files that were posted.

I just looked at the one comment posted, and it would be easy to modify it to 6 stars.

Change the value list by adding 6 to the list

Go into define fields and change the gStarsR to 6 Repetitions

Go into layout mode and click on gStarsR field and change it to 6 repetitions

Go into Browse mode and copy and paste 6 star into the last repetition.

HTH

Lee

  • Author

...I already tried all that; selecting zero gives a blank, selecting 1 gives 2 stars and so on. Where am I going wrong?

Frank.

I am not sure I understand the problem - do you mean you have a picture to go with rating 0?

If so, just change the definition of cStars to:

GetRepetition ( gStarsR ; Rating + 1 )

If not, please explain further.

The solution that Comment has posted should work for your needs. However, there was a thread on here a few years ago asking about a netflix type star images that I posted to. It probably is not the exact solution that you are looking for, but it might give you some ideas or clarify things for you.

Netflix Stars

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.