get values of a specific field

By: Andreas panagiotopoulos | Asked: 12/07/2024
ForumsCategory: Code Snippetsget values of a specific field
Andreas panagiotopoulos asked 4 days ago
Hello, How can I get all values of a specific field with php (programmatically with the help of code snippet)? I have checked function FrmProEntriesController::get_field_value_shortcode but this will return one value based on entry_id or user_id. How can I get all field values? Thank you in advance!  
1 Answers
Rob LeVineRob LeVine answered 4 days ago
I am confused by your question. What do you mean "all field values"? What type of field is it? What is your use case?
Victor Font replied 4 days ago

The question is a little confusing based on the title. Do you mean you want to see all the values for a single field regardless of entry or user id. For example, if you have 10 entries by 10 different users, you want to see the content for field A for all 10 entries. Is that correct?

If so, create a view to display the field and don't apply any filters or other constraints.

Andreas panagiotopoulos replied 3 days ago

Yes @Victor Font, I'd like to have all field values in a php array or object programmatically, as I'm writing a code snippet. This is easy to be done visually with views but I'd like to store these values of a specific field in an array or object.

Rob LeVineRob LeVine replied 2 days ago

In that case you'll want to familiarize yourself with the FrmEntry (and similar) functions to get the entries from a form and do whatever you want with them. See https://formidableforms.com/knowledgebase/php-examples/ and https://formidable-masterminds.com/how-frmentrygetall-works/ to start

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