Forums › Forums › Search & Filter Pro › Add info button
- This topic has 11 replies, 2 voices, and was last updated 5 years, 2 months ago by
Trevor.
-
Trevor(Private) June 22, 2020 at 2:43 pm #249643
There is a PHP filter for input fields, but I am unsure whether it could do something as complicated as that:
https://searchandfilter.com/documentation/action-filter-reference/#filter-input-object
Trevor(Private) June 23, 2020 at 11:02 am #249743I just saw the follow up. This will be hard to do for a beginner, you may need the help of a coder. But see what you can find first.
This is all I could find:
https://support.advancedcustomfields.com/forums/topic/how-to-display-field-labels-and-values/
Anonymous(Private) June 23, 2020 at 11:31 am #249752Ok 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!
-
AuthorPosts