[ad_1]
Hello @pexel
I’ll try to describe the process with a hypothetical example.
Assuming the color field is the fieldname1, and the single line text field the fieldname2, insert an “HTML Content” field in the form and enter the following piece of code as its content:
<script>
fbuilderjQuery(document).on('change', '[id*="fieldname1_"]', function(){
getField('fieldname2').setVal(this.value, true);
});
fbuilderjQuery(document).on('change', '[id*="fieldname2_"]', function(){
let v = String(this.value);
getField('fieldname1').setVal(IF(v.charAt(0) != '#', '#', '') + v, true);
});
</script>Best regards.
