Closed crivera305 closed 4 years ago
@crivera305,
Thank you for reaching out! I am seeing the issue in the Jsfiddle that you provided, but am unable to copy the JSON that you provided above? Can you repost it so that we can investigate the form and try and locate the issue?
Thank you.
try this i made a pastebin with just the form json - https://pastebin.com/8dkX2zqh
@crivera305, Thanks for providing the form JSON. We have tested this on our side and are unable to replicate using the form JSON. Taking a look back at the JSfiddle, I am now unable to replicate any of the issues. Did you make any changes to the form?
I have not made any changes. If there were anything that could have changed it could be a version update to formio.
The jsfiddle uses: https://unpkg.com/formiojs@latest/dist/formio.full.min.js which currently redirects to: https://unpkg.com/formiojs@4.11.0/dist/formio.full.min.js
After clearing cache the issue is still apparent in all browsers ( Firefox, Chrome & Safari ) - the Behavior Issues panel loads with no internal components shown. Screenshot: https://ibb.co/mTmThKq
I have also created a video to demonstrate what I mean: https://streamable.com/tjti2h
Page loads
Scroll to area where Behavior Issues panel component loads
Behavior Issues panel loads empty ( FAIL )
I click "NO" for the Behavior Issues radio
Then I click "YES" for the Behavior Issues radio
Behavior Issues panel loads with internal components
Behavior Issues panel internal components values are blanked out ( FAIL )
** this demonstrates that subcomponents are available to the form on load - but are not displayed.
What i am expecting is that when the form loads - all internal components of a Behavior Issues panel should be shown.
There seems to be an error reflected in the video - screenshot of that for better clarity purposes: https://ibb.co/QHdbbCV
Please advise. Thanks
Hello @crivera305,
We took a further look at your code and see that the Radio for Behavior Issues Radio does not have the default value of Yes. This could be what is causing the problem. Can you add this setting and see if it is working?
I believe you misunderstood what the issue is. Let me try to explain from top to bottom my experience and what the issue is.
The issue is not the default form ( that works as expected ).
In our case we do not want the form defaulted to YES - we want the user to click YES on "Behavioral issues" to show the corresponding panel & questions. ( no reason to have everything showing makes the form too long )
The issue is the form has already been filled out with "Behavioral issues" set to YES and when we render the form from JSON - the conditional handling is broken.
Example:
"didAnyBehavioralIssuesOccurOnYourShift": "yes",
please note no where in the logic do we show the panel without the internal components this is an error with Formio Rendering engine when rendering the form from the JSON i provided.
If you watch the video ( https://streamable.com/tjti2h ) you will notice that when Formio is rendering the form parsing the JSON ( https://pastebin.com/CigS4AUR ) - an error is thrown ( https://ibb.co/QHdbbCV )
This is all demonstrated in my first post which references my jsfiddle. ( https://jsfiddle.net/0mkns9av/ )
When you run my fiddle you will notice the:
"didAnyBehavioralIssuesOccurOnYourShift": "yes"
from JSON
Please review and let me know if i can clarify anything. Thanks for your assistance and time toward this matter.
Hello @crivera305, Thank you for providing the additional information. We are able to replicate this and have created a ticket and have added it to our backlog. We welcome a pull request or have a process to expedite this issue if you are interested.
If you are interested in expediting this issue, please contact support@form.io and reference this ticket number for this issue (FJS-1111).
We will let you know as soon as this issue has been resolved.
Have a great weekend.
@crivera305 This issue should be resolved in version 4.12.0-rc19 of formio.js.
Environment
Please provide as many details as you can:
Steps to Reproduce
** if you check the form code you can see that Behavior Issues Panel Component contains more components within it.
Expected behavior
When some one saves a form answer with "Yes" for behavior issues radio button:
Observed behavior
When we load the form answer
there are other components defined to show up within this panel yet it loads blank every time.
Trying to come up with a work around. I tried to:
Example
https://jsfiddle.net/0mkns9av/
For code or form JSON, please enclose in a code block: