Add custom field to summary field

By: James Forster | Asked: 07/09/2024
ForumsCategory: Code SnippetsAdd custom field to summary field
James Forster asked 5 months ago
Hi guys, Has anyone been able to add their custom field to the summary field display? I can't find an existing hook in the docs to do this. The hook 'frm_pro_fields_in_summary_values' looks like it could work but the docs say its for exclusion and I can't find a way to bend it to include instead. Cheers, James
1 Answers
Best Answer
Rob LeVineRob LeVine answered 5 months ago
I've never used that hook before, however, it seems worth a try to add to the $fields array, rather than removing it from it as the example shows. Assuming the id of the field you want is 999, you'd do something like:
$myField = FrmField::getOne(999);
$fields[ $myField->field_key ] = $field;
James Forster replied 4 months ago

Cheers Rob, will give it a go

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right