Okay
  Public Ticket #1209307
Automatically fill a cell with custom value for each new row
Closed

Comments

  • ecoluzmx started the conversation

    I'm setting up a new table and I would like to know if it is possible to automatically fill a cell with a custom value every time a new row is created. What I'm trying to accomplish is to create automatic "serial numbers" with a custom format which would be something like:
    ###-Three Characters-A consecutive number (where ### means 2 or 3 digits which correspond to user's id). For example 23-TOR-01, and the value for a new row would be: 23-TOR-02, and so on.

    Is this currently possible in wpDataTables or can I accomplish this using SQL queries or would it be through an Ajax call or should I use a javascript to generate the serials?

    Thank you for your time.

  •  1,708
    Miloš replied

    Hi ecoluzmx,
    Thank you for your purchase.

    Sorry for late response we were very busy because of the 2.0 Beta release of our plugin.
    Unfortunately something like this is not possible with the plugin build in functionalities and it requires some code customization.

    You can use Default value ( attachment ) for desired columns in Optional column setup for table that will be displayed in filters on the page load but users will be able to delete that field if they want to edit the data in the table.

    In our 2.0 version of the plugin it will be possible to define the default values for filters and default values for editing.

    Sorry for any inconvenience.

    Best regards.

    Kind Regards, 

    Miloš Jovanović
    [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