To tackle this problem, I crafted a JavaScript function:
function flanceTitleHelper(country) {
const countryValues = {
'1': 'Afghanistan',
'2': 'Albania',`enter code here`
// Add more countries as needed
};
return countryValues[country] || 'default';
}
For the title field, I defined it like this:
'title_field' => '{{{ flanceTitleHelper(country) }}}',
Top comments (0)