Matrix with Text inputs is required through condition but form can be submitted

  • ravirangan
    Asked on September 15, 2014 at 12:02 PM

    I am using a matrix field whose initial state is not required. However, based on a previous questions response, the matrix field needs to be conditionally set to required. However, in the condition dialogs, it does not seem to work as for matrix as I want to set the required to "if it has some value" (not all cells or atleast one row). It just ignores the required and allows me to submit even if I do not have any response in any of the cells in the matrix.

     

  • Elton Support Team Lead
    Replied on September 15, 2014 at 1:14 PM

    Hi,

    I can't seem to reproduce the problem. Once the matrix becomes required, you will not be able to submit the form as it asks a value.

    If you want to require at least one value or an every row, you can set it on the matrix field properties. Here's how:

    Matrix with Text inputs is required through condition but form can be submitted Image 1 Screenshot 20

    Hope this helps. If I have misunderstood your question, let us know here.

    Best Regards!

  • ravirangan
    Replied on September 15, 2014 at 10:09 PM

    Hi,

    Here is how to simulate the problem. Create a radio button field with Yes No options.

    Create a matrix field which is initially not required. Then in conditions dialog, add rules that if user chooses yes , make the matrix field required. If the user chooses No, make the matrix field unrequired.

    In the scenario that user chooses Yes, the matrix field label shows the asterisk that it is required but when I submit the form with no data filled in the matrix, it allows me to submit it. That is the issue.

  • Elton Support Team Lead
    Replied on September 16, 2014 at 1:30 AM

    Yes, that's exactly what I did. Anyway, I have tried it once again this time by using text box as the matrix input type and I was able to reproduce the problem. I have now raised this to our developers for further investigation.

    What you can do for now in order to make the matrix field required once the condition is met, set the required option under its properties to any of the 3 required options as seen on the image below.

     Matrix with Text inputs is required through condition but form can be submitted Image 1 Screenshot 20

    This should help. Thanks!

  • ravirangan
    Replied on September 16, 2014 at 6:24 AM

    thanks. Sorry I should have mentioned text input. Really appreciate the support.

  • rangachariartrust
    Replied on September 18, 2014 at 7:36 AM

    Will this be fixed soon. Like Elton said " I was able to reproduce the problem ". Let me repeat the problem with the scenario I am using.

    I have a number field which asks number of brothers the user has. By default the value is zero. Hence the initial value of the matrix is NOT required. If user changes the value to 1 or 2, then the matrix field needs to change to "Require atleast one answer". However, in the condition wizard, there is no option to set the required to this setting. It only has Yes. Setting to yes, DOES NOT check for empty value in the matrix and it allows me to submit data.

    Do you think we can have a fix soon, as I plan to go live soon.

     

  • Ben
    Replied on September 18, 2014 at 10:19 AM

    Hi,

    For now ti would be best to use the temporary fix that colleague @Elton has provided. Once the developers find the solution for your problem they will update you on this thread so that you know about it and can start using applying it in your JotForms.

    All that we can tell you is that our colleague has notified our developer team about this, but we can not provide you with any estimation of the time that will be needed for our developers to resolve this.

    We do however have very skilled developers, so you can expect them contacting you back with the fix or an update :)

    Best Regards,
    Ben