Okay
  Public Ticket #2277286
Data entry validation
Closed

Comments

  •  1
    John started the conversation

    Hello Support, sorry we did not find any help guide on this question.

    How do we validate and notify users upon data entry that the entry is valid, within certain criteria?

    Regards


  •  2,498
    Aleksandar replied

    Hello John

    I'm sorry, but I don't believe that is possible with wpDataTables.

    Can you please show me an example of what you need them to enter, and how you'd verify if the entry is valid?

    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

  •  1
    John replied

    Hello Aleksandar

    Thank you for you reply.

    This would be a show stopper for us if not available, so hope it's easy or misunderstanding of what's possible.  Typical examples for our users are:


    1. Date entered is not a future date.

    2. Date 1 entered is after Date 2 entered

    3. Date 2 (most recent) - Date 1 (older) is less than a certain value.

    4. Any entry is less than/ greater than/ not equal to/ equal to some fixed or variable value also entered on the same 'row'.

    So, quite typical validations.  This is really a whole 'module' in effect, it would turn the application from a (excuse the word) 'dumb' data entry into something that validates entries before then are recorded.

    Hoping this is possible, somehow.

    All that comes to mind is that we allow users to enter data into Google Sheets with data validations and we link to that into wpDataTables, but that is really, and should be, unnecessary.  I don't know SQL or code, but we are surely also able to code this kind of entry?  If so, please could you give me some direction that I could then task a coder with to implement for us.

    We are hoping to move away from the awful support and awful reliability of Zoho Creator to implement our systems using wpDataTables.  Zoho Creator does have very good data validation at the point of data entry/ edit.

    If such were implemented in wpDataTables we'd expect this would probably be a new tab on the column screen called VALIDATION.  As a first step it could be simple function that had a logic statement for a value or range of values, say, as described above in my examples.

    e.g. (this column entry) [less than, greater than, equal to, not equal to, less than or equal to, greater to or equal to, contains, does not contain] (another field or value such as today, yesterday, this week, next week, this month, last month, this year, next year....)

    Thanks again.  Fingers crossed.

    Regards

    John

  •  2,498
    Aleksandar replied

    Hi again John

    I really am sorry, but we don't have any of those validations you mentioned. The current validations we have (URL, e-mail) have been frequently requested by our users, so we added those. These, however did not appear in requests that often, so we haven't considered them.

    It's a good advice, though, and I have forwarded that to our development team, so they can take it into consideration.

    A good workaround would be with Google Spreadsheets, but in that case, you wouldn't be able to edit the data in wpDataTable.

    It's not that easy to implement these data validation rules, so as it definitely falls under custom work, it wouldn't be cheap either.

    Unfortunately, our developers are very busy at the moment, working on some priority tasks and fixing bugs and issues with our plugins, so they won't be having the time for custom work in near future.

    But we can recommend these services for customization:

    https://codeable.io/?ref=l1TW1

    https://wpkraken.io/?tms-plugins

    They do develop such solutions, so can you please send your inquiry to them?

    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

  •   John replied privately
  •  2,498
    Aleksandar replied

    Hi again John

    Thank you for offering your help - it's greatly appreciated.

    I'd love to take a look and forward whatever ideas or solutions you have to our developers. I'm sure our management would also appreciate that.

    We're trying to implement most features our customers ask for, but they are easily suggested, and hard to develop. As a coder, you know that one new feature can result in conflicts or bugs with something that has been working fine for years, so there's a lot of time that goes on testing.

    Please let me know when you're done with the job descriptions, and I'll gladly take a look.

    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

  •   John replied privately
  •  1
    John replied

    Hello Aleksander

    We reviewed the hooks, and it seems they are not suitable.  I realise too the validation has to be done per record, not per column.  Here are some typical validations we use now, written in pseudo code:



    // Compare date/ time to date/ time
    if(collected_time <= received_time)

        alert "COLLECTED TIME is earlier than call Received time!  Review and correct.";
        cancel submit;

    // Compare date/ time to current system date/ time
    if(received_time > current_time)

        alert "RECEIVED DATE/ TIME is in the future!  Please review and correct.";
        cancel submit;

    // Compare calculated value to maximum expected value
    if(Delivered_after > 15)

        alert "DELIVERED AFTER (>15hrs) is very high!  Please review and correct.";
        cancel submit;

    // Compare entries
    if(CallerType = "TypeAA" & Received = null)

        alert "Received should not be blank for TypeAA.  Please correct and resubmit.";
        cancel submit;

    // Compare multiple values
    if((Request_Status = "Closed" & Accepted = "Yes" & Responder_1 = null) or (Vehicle_1 = null) or (Collected_actual = null) or (Delivered = null) or (Home = null))

        alert "Before you can close this order, please enter the RESPONDER1 NAME and/ or VEHICLE, and/ or the date/ time of COLLECTED, DELIVERED, and/ or HOME.  Please review and correct.";
        cancel submit;


  •  2,498
    Aleksandar replied

    Hi again John

    We don't have JS hooks, but this hook:

    wpdatatables_after_frontent_edit_row

    will be triggered in both cases when you edit or adding a new row in the table from front-end. Please note that data is already saved in database.

    If you want to filter data before it is saved in the databse, then you can use filter wpdatatables_filter_formdata_before_save($formData, $tableId)

    It is one of the new filters, so it will be updated in our documentation.

    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

  •  1
    John replied

    Hello Aleksander

    Where do we find that documentation?  I didnt see it sorry.

    Regards

  •  2,498
    Aleksandar replied

    Hi again John

    It hasn't been added yet, that's why you can't see it.

    We will update the documentation soon, as there are a few more hooks and filters that need to be added there.

    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

  •   John replied privately
  •   Aleksandar replied privately
  •   John replied privately
  •   Aleksandar replied privately