| 1 |
var replaceFieldAndSmartValues=function(){"use strict";return function(e,t){const c=new FormData(bfSelect(`#form-${t}`)),a=window?.bf_globals?.[t],{smartTags:n}=a;let r=e;const l=r.match(/\${b\d+-\d+}/g);l&&l.forEach((e=>{const t=e.replace(/\${|}/g,""),n=a.fields[t];if(!n)return;const{fieldName:l}=n,o=c.get(l);null!==o&&(r=r.replace(e,o))}));const o=r.match(/\${input.[a-zA-Z0-9-]+}/g);o&&o.forEach((e=>{const t=e.replace(/\${input.|}/g,""),a=c.get(t);null!==a&&(r=r.replace(e,a))}));const s=r.match(/\$\{([^}]+)\}/g);return s&&s.forEach((e=>{const t=e.replace(/\${|}/g,""),c=n[t];void 0!==c&&(r=r.replace(e,c))})),r}}(); |