Code Studio: Widget get_settings base_format

Hello.

I’m working on a widget and I was wondering if there’s a list available of the base_format parameters that we can apply under the get_settings function? There’s nothing I can find in the documentation.

More specifically I’d like to allow the builder to select a Create public webpage in the front end widget settings, similar to how they might select one as a destination for a submit button.

A couple of base_format parameters I’ve found which don’t quite do the trick:

‘link’ - fine but I’d much rather they chose a public webpage from a drop down of those available than enter a URL.
‘page_path’ - enables page selection functionality similar to a link element, however no option to select a public webpage.

Is there a parameter available that will enable this?

Many thanks in advance

Are these what you mean ? Click View examples and some are listed.

Thanks Mark,

Unfortunately that list of base formats doesn’t include what I need.

I’d like for the builder to be able to specify a page (or an authenticated page) to route to via the code studio settings of the widget. As a workaround I can route to a standard webpage by passing its URL as a string, however for an authenticated page I need to build a reference which takes away from the modularity I’m trying to achieve.

Perhaps it’s not possible.

Hi,

You can define a choice setting as follows:

choice: {
	csid: "choice",
	main_label: "Choice Example",
	base_format: "choice",
	choices: cs.build_choices('page'),
}

This will give you all the pages, you can also pass in an option as part of cs.build_choices to filter down the types of pages

cs.build_choices(‘page’, { ‘type’ : ‘popup’ })

type - type of page (List below)

interface
subpage
popup
template_include
webpage_public
webpage_auth

Hope this helps.

Thanks Ged!

Works great :+1: