Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
I'm using Profile2 7.x-1.3 module and have some text fields. While I'm setting, the default value has suffered some changes (see picture1).
When a user will include a value in the field, it appears in error, with a small width, and with great height (see picture2).
The configuration of the chosen module is only for "select".
Comment | File | Size | Author |
---|---|---|---|
#6 | 2410453-6.diff | 677 bytes | vincentdemers |
#6 | 2410453-6.png | 13.47 KB | vincentdemers |
image2.png | 251.62 KB | AndersonMendes0 | |
image1.jpg | 65.53 KB | AndersonMendes0 |
Comments
Comment #1
kobb CreditAttribution: kobb commentedI can confirm this problem. My only fix is to edit the field settings and change:
Apply Chosen to the select fields in this widget? -> No Preference.
Comment #2
EricRondo CreditAttribution: EricRondo commentedSame problem for me, #1 solved it but very strange issue...
Comment #3
jbrauer CreditAttribution: jbrauer as a volunteer commentedSpecifically in
The issue here is that the $element['#chosen'] == false which evaluates to true ... then #chosen_ajax gets added to the field and later in
chosen_ajax_theme_textfield()
the presence of #chosen_ajax, even in the face of #chosen = false causes the textfield to be made into a select.The simple fix is to change:
if (isset($element['#chosen'])) {
to:
if (!empty($element['#chosen'])) {
Comment #4
jbrauer CreditAttribution: jbrauer as a volunteer commentedComment #5
jbrauer CreditAttribution: jbrauer as a volunteer commentedThis makes this a duplicate of the fix in #2218863: Chosen Ajax ignores the value of "Apply Chosen to the following elements"
Given the implications of this issue it would be great to get a new tagged release but upgrading to -dev should resolve the issue.
Comment #6
vincentdemers CreditAttribution: vincentdemers commentedI've had that same issue with 7.x-1.0-beta2+1-dev when using inline_entity_form to add a product_display using drupal commerce. It seems the chosen_ajax widget is applied to other textfields even tough there is no autocomplete_path set in the element.
I'm providing a patch for the fix that worked for me.
Comment #7
cheval CreditAttribution: cheval commentedPatch above works.
Comment #8
cheval CreditAttribution: cheval commentedPatch in #6 works here, thank you!
In case the autocomplete field doesn't change, double check the field settings if Chosen is applied to it.
Comment #10
dwebpoint CreditAttribution: dwebpoint as a volunteer commentedThanks all for pointing out the issue.
I've updated the dev branch to fix the issue.
Comment #11
dwebpoint CreditAttribution: dwebpoint as a volunteer commented