- This topic has 11 replies, 2 voices, and was last updated 5 years, 6 months ago by .
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › Add info button
Ok nice, this is working:
function filter_function_name($input_object, $sfid)
{
$acf_name = substr($input_object['name'],5);
if(strlen($acf_name)>0)
{
$input_object['attributes']['title'] = get_field_object($acf_name)['instructions'];
}
return $input_object;
}
add_filter('sf_input_object_pre', 'filter_function_name', 10, 2);
It only gives different attribute names based on the field type, for example “title” and “class title” but I wil fix that with JS.
Thanks a lot!