Checkbox widget for custom entity screens

I have been creating “Settings” custom entity screens on most of our setups in the last few months, to give easy quick access to changing settings like company details on the receipt and recently the ability to enable/disable features. It also speeds up our setup time.

So regarding being able to enable/disable features, there is no way I can have a checkbox or similar widget so have to revert to using a small Editor Widget with a 0 or 1 value, setting an Edit Mask to enforce the value entered.

image

It would be really nice to be able to replace that with a checkbox to accomplish the same thing, but in a more common and understandable way.

Or does anyone have an alternative way I can add a checkbox on a custom entity screen that would work currently?

You could use command button and change its color when pressed maybe.

That’s not a bad idea!

I thought about that too, but I don’t know how to change the colour of the button when pressed. Or to set the initial colour based on the setting value.

On Automation Command Button widgets, there is only dropdown selections for the button colour:

image

2 Likes

I have a checkbox working using formatting tags, it works…sort of…

I am using Auto Refresh with the interval set as 1 as it’s the only way I can think of to get it to show the checkbox change. This appears to be quite unreliable - one moment it works perfectly, as above, but then next moment, it doesn’t refresh at all unless I go to another entity screen, and even that doesn’t work sometimes - have to go to Main Menu, into Manage (to refresh cache) then back to the entity screen.

Managed to capture this, see below. You can see it doesn’t auto refresh, but after doing a few steps as mentioned above, then suddenly refreshes again. The {SETTING} is getting updated, you can see the “original” Editor Widget to the right of the checkbox change from 0 to 1.

Not sure if this is possibly an issue with Auto Refresh functionality?

Is there a better / more reliable way I can refresh the automation command button without using Auto Refresh?

Here is my setup

Automation Command Button Widget

Settings

image

Properties

image

Action

image

Rule

image

Hmm OK it looks like I overly optimized buttons :slight_smile: @VehbiEmiroglu made a last minute upload for you. Can you re-download 5.2.13 and check if it works fine with latest update?

btw you can change Update Program Setting action as

  1. Change Update Type as Toggle
  2. Set setting value as 1,0

So it will toggle between 1 and 0 on each execution of Update Program Setting action.

1 Like

Good idea. I am reusing the “SET Update Program Setting” action in other rules as well, so will just extend the with a parameter for Update Type as well.

1 Like

That is working much better now on 5.2.13, thanks :slight_smile:

More responsive also as you can see, almost instant compared to before there was a tiny delay.

2018-08-31_10-48-52

2 Likes

@markjw is that a receipt settings tab?
Intrigued to see what you have on there.

Yes :slight_smile:

All the fields I also use Edit Masks to ensure valid data is entered, for example to make sure they length is <= 48 characters, or 24 characters for company name.

I plan to do more, been using this for a few months now. I plan to incorporate some other features into our setup and let customer enable / disable from here. This was my main motivation for the checkbox.

In my printer templates I have something like this:

<EB>
<C11>{CSETTING:Receipt_CompanyName}
<DB>
<L00>
[<C00>[{CSETTING:Receipt_Address1}]]
[<C00>[{CSETTING:Receipt_Address2}]]
[<C00>[{CSETTING:Receipt_Telephone}]]
[<L00>
<C00>VAT No.: [{CSETTING:Receipt_VATNumber}]]
<L00>
[<C00>[{CSETTING:Receipt_URL}]
<L00>]
[='{CSETTING:DC_Enabled}' == '1' ? '<C11>Order No: {TICKET TAG:Order No}
<L00>' : '']
<W00:18, *>{DATE} {TIME}|{TICKET TYPE}

etc ...

<F>=
<C00>You were serverd by {USER NAME}
[<L00>
<C00>[{CSETTING:Receipt_Footer1}]]
[<C00>[{CSETTING:Receipt_Footer2}]]
[<C00>[{CSETTING:Receipt_Footer3}]]
[<L00>
<C00>[{CSETTING:Receipt_Thanks}]]
3 Likes

I was going to do something similar at one point.

There is CSETTING again, I didn’t see that documented, how does it different from just setting?

Setting entity screens is a great tool for simplifying admin for end user, especially on support contract to keep inquisitive users from potentially messing up backend.

That is nice settings Entity screen.

I didn’t even know we could do such a thing in Entity screen!

1 Like

It’s cached setting, I only changed it the other day from {SETTING} when Emre suggested to improve performance. It stops having to keep going to database for global settings.

Yes, however right now we don’t lock down management. It is something I have been thinking about, building more on the settings entity screen then disabling more advanced features in management to stop those who will mess it up. But either way I think it’s always important to still give means of full access to the client, even if its through another admin user code.

Yes, I wasn’t necerserally saying no access but like you said only a single admin pin for them and the bulk of normal settings in entity screen.
You could even go as far as to prevent admin pin for customer using POS screen to stop them using it as a every day pin instead having a normal manager type pin with no admin menu access just entity screen to make it a concious thought to use admin making them more aware of what they do.