Jump to content
Server Maintenance This Week. ×

Container as Radio Button...?


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

Recommended Posts

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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