- oliverpowellAsked on March 17, 2017 at 01:22 PM
Hello, I have conditions on my form that Hide and Show elements but if a user changes their first answer the form doesn't change back to its original state.
1. A user picks selection from auto-complete drop-down (I'm using "Test" as an example)
2. User is then presented Yes/No Question based on drop-down selection
3. More questions are displayed
If a user deletes the entry from auto-complete drop-down in step 1 the entire form is still visible and I can't work out how to hide it without interrupting the other conditions applied.
- JotForm SupportJanAnswered on March 17, 2017 at 04:12 PM
I was able to replicate the issue. Please try creating a "Does Not Contain" condition. In this way, if the "Name" field does not contain "Test A, Test B, Test C" then the fields below will be hidden. You can hold down the "Shift" key or "Ctrl" key to select multiple fields.
Here's the result:
Hope that helps. If you need further assistance, please let us know. Thank you.
- oliverpowellAnswered on March 17, 2017 at 07:05 PM
Hi, thank you. I've added the "Does Not Contain" condition as you suggest, however, all the fields from the entire form are now being displayed after selecting an option in the dropdown.
I should only be able to see the Yes/No after selection, but all my fields are displaying, even the ones that are set to hidden.
- JotForm SupportJim_RAnswered on March 18, 2017 at 04:12 AM
I'm seeing the same when I checked your form. However, we need to further understand what you want to happen once Test A or Test B or Test C has been selected.
From how it's setup right now, there are no conditions that handle each specific selection made on the Autocomplete Widget.
IF Autocomplete IS EQUAL TO Test A DO ...
IF Autocomplete IS EQUAL TO Test B DO ...
IF Autocomplete IS EQUAL TO Test C DO ...
Perhaps adding these conditions first based on your requirement would help us in figuring out which condition fails to trigger or what causes it to not trigger.
Your workflow looks something like this based on how I understand it:
1. If Autocomplete is blank, don't show anything
2. If Autocomplete contains any of these Test A, Test B, Test C then show Are you attending
3. If Are you attending is equal to Yes then show Email, Any dietary requirements, Are you staying nearby
- oliverpowellAnswered on March 18, 2017 at 06:46 AMYes you are right "If Autocomplete is blank, don't show anything"
But I can't get this to work without all of the fields showing up and not sure what condition to set. I've tried setting "Is Empty", but anything that is typed into autocomplete just shows the entire form. "Are you attending" should only appear if you select an autocomplete value and the rest of the form which is hidden should only ever show if a value from "Are you attending" has been set.
I do have this working to an extent, so if you remove a value or type something that doesn't match in the autocomplete, "are you attending" would disappear as expected but the problem is that the remaining form stays visible, it should also disappear.
Sent from my iPhone
- JotForm SupportJim_RAnswered on March 18, 2017 at 01:52 PM
Thanks! I checked your form once again and it looks like you finally figured it out. Here's how I see the form when I select Test A from the Autocomplete Widget:
In case you need more help, just let us know.
- oliverpowellAnswered on March 18, 2017 at 02:46 PMHi,
It's not quite working because after you click *yes* or *no* in "*are you
attending*", you can then change the value in the *autocomplete*, and at
this point the "are you attending" disappears and you can Submit the form.
I'm trying to create a form where users can't proceed or submit the form
unless they have selected a value from the autocomplete.
- JotForm SupportMike_GAnswered on March 19, 2017 at 01:35 AM
Thank you for the additional information and for describing the issue that you're still having with your form. I believe what you need in your form is something that will "empty" the selection made in the "Are you attending" radio button field if the "Auto Complete" widget is filled (or filled again). This is possible to achieve. Just add the condition below to your form and that should solve the issue you're having.
As for the result, please see screenshot below.
Notice that when I change the value of the "Auto Complete" widget the "Are you attending" radio button field becomes hidden and empty at the same time. That is why the other fields are hidden as well. Giving a correct value to the "Auto Complete" widget will show an EMPTY "Are you attending" radio button ready to take a selection again.
I hope this helps. If you have any further questions or concerns, please feel free to contact us again anytime.