Problems with "Dependant" base Forms in Editor 1.9.5

Problems with "Dependant" base Forms in Editor 1.9.5

dt1 dt1 Posts: 52Questions: 5Answers: 0

I have run into problems with forms using "Dependent" fields with Editor version 1.9.5.
This did not happen with version 1.9.4.
The form would not submit.
The Defendant fields are working but the form will not Submit.
Did someone notice this as well?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Can you provide more information, please, as there's little to go on here. Also, it appears to be working as expected here - setting the office to "XXX" changes the salary field. Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.

    Cheers,

    Colin

  • dt1 dt1 Posts: 52Questions: 5Answers: 0

    Let me check this again on my end. I can only say that it happens only on my Android 10 mobile phone while from the desktop both 1.9.4 and 1.9.5 work OK. Your example worked fine on my phone

  • dt1 dt1 Posts: 52Questions: 5Answers: 0

    I checked this again and it works ok with 1.9.5.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Excellent, thanks for reporting back,

    Colin

  • dt1 dt1 Posts: 52Questions: 5Answers: 0

    Hi Colin,
    I have bad news again.
    I did try to go back and forth with 1.9.4 and 1.9.5 and there is a problem only with the tables/Editors using Dependant.
    I can not put my finger on the problem but the Editor will not Fire the Submit with 1.9.5 vs no issues with 1.9.4. I'm using Bootstrap4 so maybe it is something related to a change you did in the CSS/JS /Buttons integration ?
    I can share the code part if needed.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    I'm not seeing in this example here - which uses BS. Can you link to your page so we can see the problem, please? Or update my previous example, please - as we'd really need to see this occur to be able to debug it,

    Colin

  • dt1 dt1 Posts: 52Questions: 5Answers: 0

    Colin,
    You can try to login to:
    https://www.micasabook.com/mbloginv2.php

    with Colin1234! for both User and Password.
    Than, go to "Properties", choose the first one and try to Add a new "Bill Pay" of the Type Insurance in the the Dependant Category. You will notice that you can not do "Submit". This is now running Editor 1.9.5 and with Previous version it did not happen.
    Elan

  • dt1 dt1 Posts: 52Questions: 5Answers: 0

    Sorry again. It looks that it is working after all with 1.9.5 . My apologies

  • dt1 dt1 Posts: 52Questions: 5Answers: 0

    I do see a problem based on the client side cofiguration.

    It works on Android 10 with Explorer. But not On MacOS Catalina v 10.15.5 with FireFox 82.0.2.

    So to my opinion there is some kind of a problem with Editor 1.9.5 & Dependant

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Have you done a cache clear on your Mac Firefox browser? I don't have a Mac with me at the moment I'm afraid, but I'll try later on.

    Allan

  • dt1 dt1 Posts: 52Questions: 5Answers: 0

    Yes I have cleared the cache. Does it work for you on some platform?

  • dt1 dt1 Posts: 52Questions: 5Answers: 0

    I also have the same problems with Chrome on Windows 10.
    I can switch back to Editor 1.9.4 if this will help you to understand something

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    With you now! Yes, I'm also seeing it in Firefox Linux. It is actually expected behaviour because the "Category" field is still in the processing state (which stops the submission from happening).

    The issue is that Editor doesn't know your dependent() methods have finished what they need to do. To do that you just need to add callback(); to your various functions - e.g.:

                            editorBillPay.dependent('tblhomesbillpay.Category', function (val, data, callback) {
                                if (val === 'Insurance') {
                                    editorBillPay.field('tblhomesbillpay.PayeeContractors').val('');
                                    editorBillPay.field('tblhomesbillpay.PayeeUtilities').val('');
                                    editorBillPay.field('tblhomesbillpay.PayeeInternet').val('');
                                    editorBillPay.field('tblhomesbillpay.PayeeTV').val('');
                                    editorBillPay.field('tblhomesbillpay.PayeePhones').val('');
                                }
    
                                callback();
                            });
    

    Allan

  • dt1 dt1 Posts: 52Questions: 5Answers: 0

    Thank you.
    I'm trying this in a few minutes, but I can tell you for sure that in Editor 1.9.4 it was no required.
    Elan

  • dt1 dt1 Posts: 52Questions: 5Answers: 0

    It is enough that I switch back to Editor
    1.9.4 and no callback(); is needed.

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    edited November 2020 Answer ✓

    Hi Elan,

    but I can tell you for sure that in Editor 1.9.4 it was no required.

    You are correct. From the 1.9.5 release notes:

    JS: When using dependent() it was possible to submit the form while a field was still processing. This is now no longer the case - the form will wait for the dependent action to complete then automatically submit.

    It was considered a bug that you could submit a form while its dependent actions were still processing.

    Regarding the r is undefined error - could you use callback({}); instead - apologies the object shouldn't have been required but looks like it is.

    Allan

  • dt1 dt1 Posts: 52Questions: 5Answers: 0

    Thank you again for your support.
    This solved the issue.

    Elan

This discussion has been closed.