Widget instance options boolean retuning string

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2022 07:37 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2022 12:47 PM
It's a bit of a quirk with Widgets but, when you are defining the option schema the "type" you select is used to determine how you display that option in the instance options, but not to define how that value is stored. I believe it doesn't matter what type you select, the value will always be stored as a string within the options object. As far as I recall it has always been that way (not something new with San Diego, just to clarify).
I hope this helps!
If this was helpful, or correct, please be kind and mark the answer appropriately.
Michael Jones - Proud member of the GlideFast Consulting Team!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2022 02:36 PM
Hi Michael!
I find it's more strange than quirk. We should receive the value with the selected type...
But since SN doesn't help us with this the simplest solution I've been using (for boolen which is my current problem):
data.show_header_title = (options.show_header_title === 'true') || false;
That way I can convert to boelan as I would like it to be.