- Issue created by @mrshowerman
- Merge request !122Exclude textfields from autosubmit recursively β (Closed) created by mrshowerman
- πΊπΈUnited States smustgrave
Eh this seems by design.
If you want to introduce a setting maybe that could work.
The or exclude auto complete
- π©πͺGermany mrshowerman Munich
Not sure if I get what you mean by that last line, but how can this be by design?
If a site builder checks the option "Exclude textfields from autosubmit", they don't really care about those fields being nested in a fieldset or not. They just want all textfields in the form to not submit the form automatically.
- First commit to issue fork.
Putting aside the question of "as designed" for now, seems like this is a deeper issue beyond just nested textfields.
I tested mr !122 with the suggested geofield module, and it's not able to add the "data-bef-auto-submit-exclude" attribute to the latitude/longitude fields because the type in the render array is set to "geofield_latlon" (see screenshot). The logic of the function relies on the "type" always being set to "textfield" or "entity_autocomplete" in order to apply the autosubmit exclude, but, as we can see with geofield, this is not always the case.
I think this should be handled by JS so that the actual type attribute of the
<input>
element itself can be checked for the type="text" or type="entity_autocomplete". See MR !123.- πΊπΈUnited States smustgrave
Letβs add some test coverage for this one
- πΊπΈUnited States smustgrave
So test-only feature is showing as green when it should be failing.
- πΊπΈUnited States smustgrave
Nice @mrshowerman does that MR fix it for you?
- π©πͺGermany mrshowerman Munich
Nice! Thanks for all the work, @mdranove. The new MR fixes my issue.
Having a closer look at the changes, I found a few things that could be improved, and took the liberty of changing them myself.I'm also attaching a static patch that can be applied against 6.0.6 in case anyone needs it.
This looks good to go for me, thus setting in RTBC.
Automatically closed - issue fixed for 2 weeks with no activity.