We have now opened a commercial services section here on the forum for registered users. If you have a Fabrik project that you wish to have someone work on for you, post it under Help Wanted. If you are an application developer and wish to earn some money helping others, post your details under Fabrik Application Developers.
Both of these are unmoderated. It will be up to both parties to work out the details and come to an agreement.
For running J!5.1 you must https://fabrikar.com/forums/index.php?wiki/update-from-github/ or include the new file manually https://fabrikar.com/forums/index.php?threads/joomla-5-1-and-fabrik-cannot-find-files-error.54473/post-285151 See also Announcements
jQuery('[id*=tc_repairs_22_repeat___locked]').each(function(){
var ids = jQuery(this).attr('id');
ids = ids.substr(ids.length - 1);
jQuery('#tc_repairs_22_repeat___quantityused_'+ids).eq(0).prop('disabled',true);
});
jQuery('[id*=tc_repairs_22_repeat___quantityused]').each(function(){
if(jQuery(this).val() > '0'){jQuery(this).closest('tr').find('input').attr('disabled', true);}
});
// The block you want to use
var blockRef = 'form_10';
// Should we use an exact match for the blockRef?
var exact = false;
var form = Fabrik.getBlock(blockRef, exact, function (block) {
// This callback function is run once the block has been loaded.
// The variable 'block' refers to Fabirk.blocks object that controls the form.
// var v = block.elements.get('tablename___elementname').get('value');
// If your element is in a repeat group its name is prefixed with _0, _1, _2 etc - to get all element values in an array....
var values = [];
Object.each(block.elements, function (element, key) {
if (key.contains('tc_repairs_22_repeat___quantityused')) {
//values.push(element.get('value'));
if(element.get('value') > 0) {element.element.disabled=true; }
}
});
});
requirejs(['fab/fabrik'], function () {
if(jQuery('#fb_products___id_0').val()=='')
{
window.startCount = 0;
}
else
{
window.startCount = jQuery("fieldset#group480 div.fabrikSubGroup").length;
jQuery('input[id^=fb_products___quantity_]').prop('disabled',true);
}
Fabrik.addEvent('fabrik.form.elements.added', function (block) {
var repeatCount = jQuery("fieldset#group480 div.fabrikSubGroup").length;
if(repeatCount > window.startCount && window.startCount>0){
var idx = 0;
while (idx < window.startCount) {
jQuery('#fb_products___quantity_'+idx).prop('disabled',true);
idx++;
}
while (idx < repeatCount) {
jQuery('#fb_products___quantity_'+idx).removeProp('disabled');
idx++;
}
}
});
});
Maybe one day it will get fixed.
requirejs(['fab/fabrik'], function () {
if(jQuery('#tc_repairs_22_repeat___id_0').val()=='')
{
window.startCount = 0;
}
else
{
window.startCount = jQuery("fieldset#group480 table tbody tr.fabrikSubGroup").length;
jQuery('input[id^=tc_repairs_22_repeat___quantityused_]').prop('disabled',true);
}
Fabrik.addEvent('fabrik.form.elements.added', function (block) {
var repeatCount = jQuery("fieldset#group480 table tbody tr.fabrikSubGroup").length;
if(repeatCount > window.startCount && window.startCount>0){
var idx = 0;
while (idx < window.startCount) {
jQuery('#tc_repairs_22_repeat___quantityused_'+idx).prop('disabled',true);
idx++;
}
while (idx < repeatCount) {
jQuery('#tc_repairs_22_repeat___quantityused_'+idx).removeProp('disabled');
idx++;
}
}
});
});
while (idx < repeatCount) {
jQuery('#tc_repairs_22_repeat___quantityused_'+idx).removeProp('disabled');
idx++;
}
while (idx < repeatCount) {
jQuery('#tc_repairs_22_repeat___quantityused_'+idx).removeProp('disabled');
jQuery('#tc_repairs_22_repeat___rma_'+idx).css('display','none');
idx++;
}
if(jQuery('#tc_repairs_22_repeat___id_0').val()=='')
{
window.startCount = 0;
}
else
{
window.startCount = jQuery("fieldset#group22 div.fabrikSubGroup").length;
jQuery('input[id^=tc_repairs_22_repeat___quantityused_]').prop('readonly',true);
jQuery('[id^=tc_repairs_22_repeat___stockid_]').prop('readonly',true);
}
Fabrik.addEvent('fabrik.form.elements.added', function (block) {
var repeatCount = jQuery("fieldset#group22 div.fabrikSubGroup").length;
console.log(repeatCount+' '+window.startCount);
if(repeatCount > window.startCount && window.startCount>0){
var idx = 0;
while (idx < window.startCount) {
jQuery('#tc_repairs_22_repeat___quantityused_'+idx).prop('readonly',true);
jQuery('#tc_repairs_22_repeat___stockid_'+idx).prop('readonly',true);
idx++;
}
while (idx < repeatCount) {
jQuery('#tc_repairs_22_repeat___quantityused_'+idx).removeProp('readonly');
jQuery('#tc_repairs_22_repeat___stockid_'+idx).removeProp('readonly');
jQuery('#tc_repairs_22_repeat___stockid_'+idx+'-auto-complete').removeProp('readonly');
jQuery('label[for=tc_repairs_22_repeat___check_'+idx+']').hide();
idx++;
}
}
});
Fabrik.addEvent('fabrik.form.group.delete', function (block) {
var repeatCount = jQuery("fieldset#group22 div.fabrikSubGroup").length;
console.log(repeatCount+' '+window.startCount);
if(repeatCount < window.startCount || repeatCount == window.startCount){
window.startCount= repeatCount - 1;
}
});