Hello, i got a really bad problem.
I created a multi tabbed builder, i added 2 custom fields based on text type.
When i create a new tab and go back to the prévious one i can't add my custom fields anymore, i got this message : " Please ensure you have registered it, and imported it correctly." .
So my question is : how to register them globally but without creating plugin, just in my js file associated with my HTML ?
hi i was added cutrom attributes visibleIF, how can i render forms from json
const options = {
formData: '[{"type":"smartRadioGroup","label":"SmartTest5","name":"smartRadioGroup-1638175329310","registries":"134"}]'
};
var wrap = $("#slownik2_wrapper");
const formRender = wrap.formRender(options);
ERROR: Uncaught Error: Invalid control type. (Type: smartRadioGroup, Subtype: undefined). Please ensure you have registered it, and imported it correctly.
Hello,
I'm creating SAAS and I would like to use this plugin in it.
However, I'm wondering if it's possible to customize how the fields are displaying, for example to have "required" on first screen and not to show it when you click "edit"
Check the screenshot below so you can know what I'm talking about, I need something like this:
https://i.ibb.co/t8Lrnv3/b543222.png
Thanks
// configure the class for runtime loading
if (!window.fbControls) window.fbControls = []
window.fbControls.push(function(controlClass) {
/**
* data range class
*/
class controlDataRange extends controlClass {
/**
* Class configuration - return the icons & label related to this control
* @returndefinition object
*/
static get definition() {
return {
i18n: {
default: 'Data Range',
},
}
}
/**
* build a text DOM element, supporting other jquery text form-control's
* @return {Object} DOM Element to be injected into the form.
*/
build() {
return this.markup('input', null, {type:"range", min:1, max:10, steps:1, value:0})
}
onRender() {
var valueBubble = '<output class="rangeslider__value-bubble" />';
function updateValueBubble(pos, value, context) {
pos = pos || context.position;
value = value || context.value;
var $valueBubble = $('.rangeslider__value-bubble', context.$range);
var tempPosition = pos + context.grabPos;
var position = (tempPosition <= context.handleDimension) ? context.handleDimension : (tempPosition >= context.maxHandlePos) ? context.maxHandlePos : tempPosition;
if ($valueBubble.length) {
$valueBubble[0].style.left = Math.ceil(position) + 'px';
$valueBubble[0].innerHTML = value;
}
}
$('input[type="range"]').rangeslider({
polyfill: false,
onInit: function() {
this.$range.append($(valueBubble));
updateValueBubble(null, null, this);
},
onSlide: function(pos, value) {
updateValueBubble(pos, value, this);
}
});
}
}
// register this control for the following types & text subtypes
controlClass.register('DataRange', controlDataRange)
return controlDataRange
})