The Problem
Here's a common usability issue with Formidable Forms Pro lookup fields. I am trying to
Use Field 32 (e.g., a lookup field for a name) to automatically populate Field 23 (e.g., a category). Field 23 is already watching Field 32. Note, Field 23 is not visible until a value is entered in field 32
But even though the value shows up in Field 23’s dropdown after selecting from Field 32, it still requires the user to click and manually select the value.
What I want to achieve: The Goal:
As soon as Field 32 is selected, Field 23 should automatically select the corresponding value (not just show it in the dropdown).
What I have done
Below is a simple script I wrote to handle this, but it is not working.
jQuery(document).ready(function($) {
$('#field_hnt7g').on('change', function() {
// Wait for Field 23 to become visible and populated
setTimeout(function() {
// Check if Field 23 is visible
if ($('#field_21m1c').is(':visible')) {
var selectedValue = $('#field_21m1c').val();
if (selectedValue) {
$('#field_21m1c').val(selectedValue).trigger('change');
}
}
}, 1000); // 1-second delay to allow conditional logic and lookup to complete
});
});
Hi Rex, I arrived here after searching for a solution similar to what you described. Thankfully I was able to find one.
Rather than a "Lookup Field", what we actually need to do is add a regular field (I went with Text) and auto-fill it with a "Lookup Value." Here's how to do that:
1. Add a new Text Field after your source field
2. Open the Advanced accordion
3. On the top right of the first text box (Default Value), there are three icons. The Search icon is Lookup Value. Click that.
4. Search in the form and input that has the value you want.
5. Watch the lookup field that you want to match values from.
6. Save and test.
Now, when you select a value from the source lookup field, the text field should fill the value.
Hope this helps.