Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
For each node we are allowing users to edit a textfield and a single on/off checkbox field using a view. For some reason the checkbox requires you to click save, but the textfield updates automatically when you click out of the field. Is there any way to use either only save buttons or only automatic saving? We think it will confuse our users to have each type of field save differently.
Thanks a ton and nice work on the plugin. It's pretty awesome.
Comment | File | Size | Author |
---|---|---|---|
#10 | editablefields-fix-checkbox-alpha2-1245326-8.patch | 832 bytes | _vid |
#7 | editablefields-fix-checkbox-alpha2-1245326-7.patch | 892 bytes | _vid |
#3 | editablefields-1245326-3-fix-checkbox.patch | 897 bytes | mikeytown2 |
#1 | editablefields-save-button-1245326.patch | 985 bytes | jg314 |
Comments
Comment #1
jg314 CreditAttribution: jg314 commentedI realized that this was due to the code in editablefields.js. I have included a patch that will also make checkboxes work without the save button.
All I did was add input[type='checkbox'] to two jQuery selectors.
Comment #2
krlucas CreditAttribution: krlucas commentedMarking as duplicate of #1249730: Hide submit button for radio buttons too. Both patches look nearly identical. Auto submitting radio buttons make a little more sense to me than checkboxes given potential latency issues when I want to check more than one checkbox. Thanks!
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedPatch in #1 fixed an issue we were having. Re-rolled for latest dev.
Comment #4
bschilt CreditAttribution: bschilt commentedI have applied the patch in #3 to 7.x-1.0-alpha2+7-dev and it works great!
Comment #5
dags CreditAttribution: dags commentedCommitted the patch in #3 to 7.x-1.x. This fixes the issue for views but the regular node display is still off. I imagine we'll want to fix that too.
Comment #7
_vid CreditAttribution: _vid commentedFor anyone still using 7.x-1.0-alpha2 here's the patch in #3 rerolled for alpha2.
Comment #8
jason.fisher CreditAttribution: jason.fisher commentedPatch does not work for checkboxes > 1.
Should become:
Comment #9
_vid CreditAttribution: _vid commented@jason.fisher; I totally agree. Though we went about it in a different way;
I updated that line to allow 1 or more text, checkbox, textarea and selects and more than 1 radio:
if ($this.find('input[type=text],input[type=checkbox],textarea,select').length >= 1 || $this.find('input[type=radio] ').length > 1) {
In doing so, we noticed that the 'add more' button would disappear. So we also updated that hide() statement:
$this.find('input.form-submit:not(".field-add-more-submit")').hide();
Here's the diff between my patched version in #7 and this:
It may go beyond the scope of this (resolved) issue so I didn't post a fresh patch but let me know what you think of this solution. If it takes care of your multiple checkbox needs then I'll upload a fresh patch for alpha2.
Comment #10
_vid CreditAttribution: _vid commentedWe're still using the patch #7 and I just re-rolled it from within the editablefields directory.
Essentially the only changes are the path:
a/editablefields/editablefields.module b/editablefields/editablefields.module
Becomes
a/editablefields.module b/editablefields.module
Comment #11
HelloStephanie CreditAttribution: HelloStephanie commentedThe last patch is working for me except not in the Bootstrap theme https://drupal.org/project/bootstrap 7.x-3.0.
Any ideas why it doesn't work with Bootstrap?
Comment #12
HelloStephanie CreditAttribution: HelloStephanie commentedFigured it out. This patch should also include alternate forms of input buttons such as Bootstrap's: "button.form-submit"
Comment #13
vadim_k CreditAttribution: vadim_k commenteddoes anyone have any idea how to patch editablefields for autosaving selectboxes created by chosen?
Comment #14
jgullstr CreditAttribution: jgullstr commentedIssue related to bootstrap: #1909768: Editable field is hidden in Views table themed by Bootstrap theme
Comment #15
cockers CreditAttribution: cockers commented#10 worked for me, will this be committed?