Okay
  Public Ticket #1427542
Initialize a float field to be empty
Closed

Comments

  • Ross started the conversation

    Hi, I have two cosmetics-related questions:

    A) when making a table front-end editable, I want the user to be able to click on a (float type) cell and being writing his/her input immediately. Ideally, the cell would simply be empty (rather than contain "0.0"), or would eliminate the "0.0" immediately upon start typing.

    Right now the steps to enter something like 83.5 are:

    1. Double-click on a cell

    2. enter 83

    3. click remove (to erase the 0 from the 0.0 in the cell)

    4. advance the caret to after the decimal point

    5. enter the "5"

    6. click remove (to erase the remaining "0" in the cell)

    Or one can click remove three times in step 3 to begin with, and then enter 83.5 - still too much work for an unsuspecting user.

    B) Is it possible to somehow make "Enter" either advance to the next cell or finish editing when manually editing a table cell in the front-end?

    It's surprisingly annoying that one can't do that by default and for a non-technical user this would be "the table didn't work" issue.


    Thank you so much,

    Ross

  • [deleted] replied

    Hi Ross,
    Thank you for your inquire.

    Because one click is reserved for row selection and some other problems which are not properly solved on browser base like text selection in inputs maybe it would be easier for you to use Excel-like editor instead. 

    This editor supports editing by just start typing when cell is selected, also you can also change cell on hitting Enter. More information about Excel-like editor can be found in our - Documentation

  • Ross replied

    Hi, no, it won't work - I'm talking about front-end editing.

    My concern is that my users will try to edit the table using the conventional click-input-enter method and, the way it works now, they will fail. I couldn't find how to make the table on the FRONT-END to display in Excel-like mode.

    Is there perhaps some CSS/JS magic that can be applied to the page to allow selection of cell content upon focus + entry upon ENTER?

    Thank you!

  • [deleted] replied

    Hi Ross,

    •  I couldn't find how to make the table on the FRONT-END to display in Excel-like mode.
      You have to add  "table_view=excel" in shortcode so it becomes [wpdatatable id=1 table_view=excel] or use MCE button to add new table which has option to choose table layout 
              
    • Is there perhaps some CSS/JS magic that can be applied to the page to allow selection of cell content upon focus + entry upon ENTER?
      Something like this could be done but it will require developing custom solution