Okay
  Public Ticket #2011038
Default values not carried in Apply and Add New
Closed

Comments

  • Robert started the conversation

    I have default values set for a field.  When adding one record at a time, there are no issues.  However, when choosing, "Apply and Add New", the default values do not carry forward to subsequent records.  The field shows as blank instead of containing the default value.

  •  2,572
    Aleksandar replied

    Hello Robert.

    Thank you for reaching out to us, we are aware of the issue - it was already reported to us.

    Our developers are working on resolving it, although I cannot say if it will be fixed with our next update, since we have a lot of primary tasks to handle at the moment, and other bugs and fixes for all our plugins. It is on our to-do list, but I cannot say when it will be resolved.

    Sorry for the inconvenience.

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Robert replied

    Can I comment out the button for "Apply and add new" in the source code?  I'm not sure where it resides, but if I can do that, to force just an "Add" then that would be fine until the bug is fixed.  Thanks.

    Rob

  •  2,572
    Aleksandar replied

    Hello Robert.

    To hide the "Apply and add new" button, you need to add the following CSS to your Custom CSS field in main settings of wpDataTables:

    .wpdt-c #table_1_apply_edit_dialog {
    display: none !important;
    }
    

    This will just hide the button from front-end, but anyone who knows a thing or two about CSS can inspect the page and enable it again.

    I don't know if you'll find it useful to hide it for all your tables, but if you do, here's how to remove it from the modal completely:

    Open ../wp-content/plugins/wpdatatables/templates/frontend/edit_dialog.inc.php and around line 166 find this line of code:

    <button id="<?php echo $this->getId() ?>_apply_edit_dialog" class="btn btn-success btn-icon-text waves-effect wdt-apply-edit-button">
            <i class="zmdi <?php if(in_array($currentSkin, $skinsWithNewEditButtons)) { echo 'zmdi-check-circle'; } else { echo 'zmdi-check';  }?>"></i>
            <?php _e('Apply and add new', 'wpdatatables'); ?>
    </button>
    

    Just comment it, so it looks like this:

    // <button id="<?php echo $this->getId() ?>_apply_edit_dialog" class="btn btn-success btn-icon-text waves-effect wdt-apply-edit-button">
    //         <i class="zmdi <?php if(in_array($currentSkin, $skinsWithNewEditButtons)) { echo 'zmdi-check-circle'; } else { echo 'zmdi-check';  }?>"></i>
    //         <?php _e('Apply and add new', 'wpdatatables'); ?>
    // </button>

    and that will remove it from the modal.

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables