Hi there! I have an issue that a stucking with for 2 days now…
I have a wordpress site with Gravity form Elite plugin. I created a form with some fields and a select field which I tagged with select2js classes.
This select2js field make an ajax request and display the espected result, then when I select a value, I’m able to get the datas link to the object selected and pre-fill some other fields.
However, I move from CF7 to Gravity Form (client request) and my select2js field doesn’t populate his own field anymore… I see the value in the select2js field but when I submit the form the field has the option value and not the selected value.
Well, some screen/code will be better :
my form.js file with select2js setup: https://gist.github.com/Xutyr/479dc10475d25cedafd49617845cbba6
My select2js with expected value:
If I select for instance the first one “Test Oceane” I got “Test” in the select2js field
So the value is well select in the field but if I look to the HTML I have this:
End finally when I submit the form, it’s the option value 1144 which is saved and not my Test. I compared my gravity form html structure with the previous CF7 usage. I have this on the select2js selection:
<span class="select2-selection__rendered" id="select2-nom-container" role="textbox" aria-readonly="true" title="Mme">
<span class="select2-selection__clear" title="Remove all items" data-select2-id="122">×</span>
Test
</span>
The “data-select2-id” data field and the remove items span are missing, furthermore on the previous screen the option created in the select field is weird:
<option value="1144" title="Mme" data-select2-id="select2-data-92-jqbu"></option>
I have no idea how to fix it I tried so much thing…
If someone could help me, it’s will be great!
Note: If I create a new tags I don’t have any issue because the option value is the tag value.
Edit: I setup the same version of the plugin (v12), I’m getting the same DOM now. But still have the value like 1144 saved instead of Test.
Kind regards
Xutyr