Okay
  Public Ticket #3026852
Editing fields in a table
Closed

Comments

  • Nathaniel Mantell started the conversation

    Hi, I am trying to edit fields in tables created from my database. I set up a table with a "text" field in it and I am trying to enter newline characters by hitting the enter/return key on my keyboard into the text. However, the text editor will not recognize the enter/return key input, and even if I copy and paste text from a text editor, it will strip out the newline characters.Is there a way to edit tables and keep the newline characters in the text?

  •  1,851
    Miloš replied


    Hi, Nathaniel

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.

    -

    I am not sure i understood correctly.

    I assume you mean, if you open a pop-up editor, or in-line editor, on a string field, it is not accepting going to new line, when hitting Enter?

    If that's the case, you probably set the column as one line string; 

    i will show you an example of a multi-line string compared to it:

    9377350800.png

    If you predefined the column during table creation in wpDataTables as "one line string", it is possible that in the database the field got saved as VARCHAR, rather than TEXT ;

    9300375098.png

    If that happened, then the plugin won't accept going to a new line, in regular Pop-Up editor, or in-line editor;

    1423297404.png
    3921820846.png

    So, you can double-check both ends, make sure to set the column in the plugin to multi-line, and also in the database, it has to be "TEXT" ;

    or you can simply delete the column in wpDataTables, and add a new one, setting as multi-line, and it should accept Enter for new line, as well as copying finished values with newlines.

    5417694920.png

    -

    Also, if you use a Manual table, you have the facility of switching to Excel-like editor, which allows quicker editing:

    5524860058.png

    Let me know if that helped.smile.pngThank you

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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

  • Nathaniel Mantell replied

    Thanks Miloš

    I have created this table with the source as a SQL Query

    in the database the column I need to edit with newline characters is a "text" type

    I don't see any way to delete or add columns like in your screenshot. Maybe that option is not available for tables based on SQL?

    Also, in the column settings, the only string option I have in the "Column Type" dropdown is just "string"

    What version of wpDataTables are you using? I believe I am using the latest version with the plugin set to auto-update

  •  1,851
    Miloš replied

    Hey, Nathaniel

    Firstly i want to apologise for the delayed response time.

    We celebrated our Orthodox Easter, which has slowed down our working pace.

    Thank you very much for your patience.

    -

    You are correct; i was using a Manual table, that one lets us delete, or add columns;

    for SQL Query tables, we don't have the option.

    But it's great that you set it as TEXT type in the database; this means you only have one more step to do;

    in the Editing tab, Editor input type, set it as "multi-line edit", and you should be good to go,

    it should now allow you to hit Enter for new line, or simply copy multiple lines from other sources.

    8452759389.png

    Let me know how it goes. Thank you

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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