Grabbing Values in a Field for All Entries

By: Asheley Bailey | Asked: 01/15/2023
ForumsCategory: General questionsGrabbing Values in a Field for All Entries
Asheley Bailey asked 1 year ago
Hi Everyone, I'm in the midst of writing a function that needs to use the value submitted in a field. The only hook I've found is for a particular entry. Is there a hook that is generic in terms of entry. The only parameter would be the field ID or field Key.  I've been looking through the formidable hooks and haven't found anything but the documentation provided is vast (which i love), so i was wondering if perhaps i've just missed it. 
1 Answers
Victor Font answered 1 year ago
"The only hook I've found is for a particular entry." What hook are you trying to use? It helps to know because depending when the hook fires you may either be able to use $_POST or you may have to look up a value. All values stored in frm_item_metas are saved with the field id. To use a key, you have to use $field_id = FrmField::get_id_by_key() in order to convert it to the field id.
Asheley Bailey replied 1 year ago

FrmProEntriesController::get_field_value_shortcode(array('field_id' => x, 'entry' => $entry_id));

This is the code I was referencing.

Asheley Bailey replied 1 year ago

To give a little more context into what I'm trying to do.

I'm using a view to create an admin page for approvals of entries. I'm adding a link/button which will trigger the approval. The caveat is that my function, which is triggered on approval, needs to pull information from the entries.

I can create a shortcode for the function with the various field IDs used as attributes but I can't connect this to a link/button in the view.

What I need is to be able to pull the information into my function within code snippets and create an onclick HTML event separately which I can use in the view.

I may have to go back to the drawing board on how I'm approaching this as I think I may have hit a dead end.

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