Hey @treylok
This can be achieved with a custom snippet for the time being until we add this feature.
Place this snippet in your child theme’s functions.php file and modify the IDs accordingly.
add_filter('mf_field_display_args', 'mf_custom_field_display_attributes', 10, 1);
function mf_custom_field_display_attributes($params) {$traget_form_id = 80;
if ( strpos($params['id'], "mform_{$traget_form_id}_mfield_") !== 0 ) {
return $params;
}
$prefix = "mform_{$traget_form_id}_mfield_";
$firstname_field_id = 1;
$lastname_field_id = 2;
$email_field_id = 3;
switch ($params['id']) {
case "{$prefix}{$firstname_field_id}":
$params['attributes']['autocomplete'] = 'given-name';
break;
case "{$prefix}{$lastname_field_id}":
$params['attributes']['autocomplete'] = 'family-name';
break;
case "{$prefix}{$email_field_id}":
$params['attributes']['autocomplete'] = 'off';
break;
default:
break;
}
return $params;
}
Let me know if you have any additional questions.
