Hi Westley,
We’ve confirmed that the interface builder only supports (out of the box) numbers for the class settings.
However, you can modify this behavior with custom javascript.
Here’s the handler in the interface builder code which listens for click events on “Save Settings” and then stores the settings. It’s part of the file “common.min.js” served from forio.com.
$('#btn-save-settings').off('click.settings').on('click.settings', ()=> {
const toSave = {
runLimit: $('#run-limit-input').val()
};
$('.settings-section [data-f-bind]').each((index, el)=> {
const $el = $(el);
const key = $el.attr('data-f-bind');
const numberFormat = $el.attr('data-f-convert') || '#';
const rawValue = Flow.dom.converters.parse($el.val(), numberFormat);
const isSelectable = $el.is(':radio, :checkbox');
const shouldSave = !isSelectable || $el.is(':checked');
if (shouldSave) {
toSave[key] = rawValue;
}
});
settingsManager.settings.saveAndActivate(toSave).then((settings)=> {
notifySuccess('Settings have been applied to current runs.');
checkAndDisableUI(settings);
});
});
Note that it adds an event listener to the button with jQuery. This listener loops through the inputs, sanitizes them ensure they are a number, then saves the setting.
While you can’t replace this code directly, you can write your own handler for this button that does something similar. Make a function that does the same behavior, but remove the code that forces it to be numerical. (Or better yet, allow only specific inputs to be non-numerical). Install it by using jQuery to remove the old event listener and replace it with your own.
We encourage you to add custom Javascript such as this to your own file “scripts.js” (or something similar), linked in from index.html.
Let us know if this is enough to move forward or if you’d like a more detailed walkthrough.
WILL