Skip to content

Commit e095e12

Browse files
committed
Bug fix: value mapping's WPForms field dropdown is sometimes empty
1 parent d6df07f commit e095e12

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

js/admin.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -2407,13 +2407,14 @@ jQuery(document).ready(function($) {
24072407
jQuery(".pdf-forms-for-wpforms-admin .pdf-mapping-row[data-mapping_id='" + data.mapping_id + "'] .wpf-field-name").text(field_caption);
24082408
});
24092409

2410-
// update value mapping drop-downs
2410+
// update value mapping drop-downs
24112411
select2SharedData.wpfFieldsChoices = {};
2412-
jQuery.each(fields, function (id, field) {
2412+
jQuery.each(fields, function (index, field) {
24132413

24142414
if(!field.hasOwnProperty('choices'))
24152415
return;
24162416

2417+
var id = field.id;
24172418
select2SharedData.wpfFieldsChoices[id] = {};
24182419
jQuery.each(field.choices, function (i, choice) {
24192420
var text = null;

0 commit comments

Comments
 (0)