Using https://formidableforms.com/knowledgebase/frm_setup_new_fields_vars/ and/or https://formidableforms.com/knowledgebase/frm_setup_edit_fields_vars/ you can filter the dropdowns, though it might depend on what "some criteria" means.
That didn't work, I have also followed this KB but didn't work https://formidableforms.com/knowledgebase/frm_setup_new_fields_vars/#kb-filter-dynamic-field-by-user-meta
Let's say I have a lookup field that from Department form, I want users that have meta data contains their department to be available in that lookup drop down.
You'll have to be more concise than "didn't work". Put some debugging statements in and see what values are along the way. What you're trying to do is entirely possible.
Sorry for the late reply, I set the below to match my form
11483= My first lookup
11480= Text field
hobby= user_dept
11483 to the id of the Dynamic field
11480 to the id of the field in the data form that you want to use for filtering
hobby to the key of the user meta you want to use for filtering
Then I got this error:
"Warning: Undefined array key "restrict" in /wp-content/plugins/formidable-pro/classes/controllers/FrmProDynamicFieldsController.php on line 136"
Line 136:
} elseif ( $values['restrict'] && ( $user_ID || self::should_restrict_options_for_logged_out_users( $field ) ) ) {
If you have an undefine array key, then you need to deal with it. Either 'restrict' doesn't ever exist or you need to change the code to be isset($values['restrict'])
To simplify my needs, can the lookup field show only user metadata?
I don't follow, but I suggest fixing the coding errors and see what happens with your initial goal.
Does this KB fit my needs? It only has a field for the lookup ID but no option to set the metadata.
I have no idea what the hook even does. Why are you not just fixing the issues in your code that was throwing errors?
I don't know how to fix it
Please login or Register to submit your answer