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.

Container replace checkbox

Featured Replies

Not sure how it's done but I have seen this before. Instead of having a smiple checkbox that displays only an "x" they have replaced it with a image of a check in a container....

I cannot figure how tis is done... Con someone show me a simple example so I may put it in my database...

Thank you

  • Author

Great thank you I will have to open this on Monday to see if I can figure how to put this sort of item on my database. Sorry for the delay. I will repost to you on monday 10 am est

Thank you for a quick response.

  • Author

Got it --- Great --

Two Questions:

1) Set is the set Global Fields For?

2) If I wanted two (2) or More Check Boxes on same layout what would I have to do so each one would act independent?

Thank you

Edited by Guest

1) Set is the set Global Fields For?

This script stores the checkbox graphics in global containers so that they are available from any table without a relationship back to Prefs.

2) If I wanted two (2) or More Check Boxes on same layout what would I have to do so each one would act independent?

You need a "dsp" field for every checkbox and a corresponding flag field.

It's a lot more dev work and fields to support the "fancy" checkbox. You'll have to decide if it's worth it. The dev community has asked for interface tools that are more current for years, but apparently it's not as simple to support x-plat and other features are higher on FM's list.

  • Author

Great thanks --- Your Set Global Field Script makes it easy -- I have several layouts that I might want to use this for -- But if I had only one -- would a relationship make more sense?

Not sure how to do that?

Thank you for all the help so far -- really helping me make more of a nicer looking database.

Typically, graphics (logos, etc.) end up on several layouts, even if you only think you'll need them on one. So, I'd go the global route from the start.

But, if you feel that you'd rather create a relationship, since Prefs is a one record only table, all you would need is to relate the table to Prefs using a Cartesian join, and then reference the container field.

  • Author

I think I will go with your first thought... I will go with your experience..

Last question --- Is there away to make a 3 way check box ---

Do nothing -- "Blank" Flag "0"

First Click -- "Check" Flag "1"

Second Click -- "Red X" Flag "2"

Third Click -- Revert back to Flag "0"

Thank you again

Edited by Guest

Yes.

Substitute the calculation that you have:

Abs ( Widgets::flag_IsActive - 1 )

with this:

Mod ( Widgets::flag_IsActive + 1 ; 3 )

But you'll need to change even the pictures and the dsp_ActiveCB calculation.

  • Author

Do you mean Toggle check box Script?? --

I have already added the global fields on the pref page and opening script///

Edited by Guest

Yes.

  • Author

Ok this is what I have now:

g_CheckboxNo

g_CheckboxYes

g_CheckboxEmpty

Script on Toggle Checkbox:

Set Field[Widgets::Flag_IsActive;Mod(Widgets::Flag_IsActive +1;3)]

The Flag status changes numbers but the icon does not...

Any thoughts?

Edited by Guest

Have you changed the display calculation as well?

See Daniele's post

But you'll need to change even the pictures and the dsp_ActiveCB calculation.
  • Author

Oh your right -- Sorry

Do not know how to right a 3 way if statement -- will a case statement work?

Case (

Flag_IsActive ="0";Pref::gCheckboxEmpty;

Flag_IsActive ="1";Pref::gCheckboxYes;

Flag_IsActive ="2";Pref::gCheckboxNo)

  • Author

Got it now -- I had a mistake in the line -- should have pointed to flag field not the check field...

Great thank you everyone ---

  • Author

Very nice -- Used a repeating Field --- Makes it very clean --

I wish I was this good to make these items -- the database would be killer then...

Thank you ---

  • Author

your Green Check is a smaller image than the red X--

Where do you find these graphics --- I would like to use them.

Thank you

Edited by Guest

Here they are.

They come from:

http://www.mouserunner.com/Spheres_ColoCons1_Free_Icons.html

Images.zip

  • Author

Thank you

Since you have no Flag Field -- How to do tell Fm that something is checked off or not -- Meaning if I have 2 check boxes and each Green Check is equal to 1 then the total would be Two -- And a script could run...

Does yours have values set with each check?

Since you have no Flag Field...

There is !

checkbox with three states::flag

  • Author

Opps sorry -- Just learning ---

  • Author

How do you convert Icons to something FM can use?

I didn't convert anything.

I just used the .png pictures.

  • Author

Great thank you --- Your method of using the Repeating Fields is very clean --- I do not have to use the case calc. if I do it your way -

Thank you again

It isn't mine.

It is a well-established use of repeaters to store similar images.

I use repeaters as well, but I wanted to keep this demo as simple and obvious for a novice.

  • Author

I have learned from this thank you -- Both of you...

Joseph

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

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.