Forum Discussion
Resetting the wrongly drag drop object
I am trying to achieve a drag drop with 2 rectangles. object 1 and 3 are correct. object 2 and 4 are wrong which will go into rectangle 2.
when i place it correctly it is working correctly. When i try to place the object 1 and 3 in rectangle 2 its not working, same case for object 2 and 4 with rectangle 1.
Also i am unable to manage the states.
I am attaching the files for your reference.
- JoanneChenSuper Hero
Hi vijey vijey,
Your triggers conflict with the drag-and-drop option settings (as shown below). You won't need those triggers to change states or open layers if the settings below align with your requirements.
- When the first checkbox is checked, the object will not be dropped onto the wrong rectangle. Consequently, the objects won't change to the state of 'drop incorrect.'
- When the last checkbox is checked, the correct and incorrect layers will show when the user clicks on submit. However, since the objects are only allowed to go to a correct rectangle, users should receive only correct feedback if all the objects are dropped on the correct targets.
If you expect the object to stay in a wrong target and experience an immediate state change, you should uncheck the first and last checkboxes. In this case, you won't need those triggers, which would only conflict with the system.
- vijeyvijeyCommunity Member
Hi Chen,
Thanks for the guidance. I will try and get back to you. if its not working correctly.
Thanks once again.
Regards,
Vijey
- vijeyvijeyCommunity Member
Hi Chen,
As guided by you, I unchecked, both the items, Partially its working well. But when I drop the correct object 1 and 3 in rectangle 2.. then i am getting the error for the first wrongly dropped object and not for the second object say object 3 here.
The same ways for the object 2 and 4 if i drop in rectangle 1.
I am attaching the file again.
I am new to this tool and i am interested in learning the tool again.
Regards,
Vijey
- JoanneChenSuper Hero
- vijeyvijeyCommunity Member
Hi Chen,
Merry Christmas to you and your Family,
1. I want to drag the object1, object2,object3,object in the left side. Here objects 1,2,3,4 is just an idea, I can have many such option as objects.
2. I have 2 rectangles, 1 and 2. Here I want to drop the correct 1 in rectangle 1 - here I have kept object 1 and 3 as correct object and needs to be placed in the rectangle 1 and if it is placed in rectangle 2. the state color should change to red, so displaying it wrong and resetting to the left side. if placed correctly in rectangle 1, then it is correct and the state should change to red color.
3. for the ojjects, 2 and 4. I want them to be placed in rectangle 2. if its done then the state color should change to green. if I place it in the rectangle 1, then it should change to red and reset to the previous list.
4.. Here is the catch. if done correctly then it should be there.. the state remains.. if made any mistakes then i want to reset only the mistake one and not the entire one.
Regards,
VIjey
- JoanneChenSuper Hero
Hi VIjey,
I see what you need now. You don't need triggers to have the dropped incorrect objects back to where it was. Just set to return item to start point if dropped outside a correct drop target as below.
And since it will show the state when dropping. You don't need a submit or review button. If you need to give feedback when all items are dropped correctly. You can use a trigger to open a layer then.
Show layer Feedback when state of all items are dropped correctly.
- vijeyvijeyCommunity Member
- JoanneChenSuper Hero
Hi vijey,
It looks like you do not set states for option 3 and option4. You can use a format blash to duplicate states of option 1 for these two.
- vijeyvijeyCommunity Member
- JoanneChenSuper Hero
Hi vijey,
Since it will show the state when dropping. You don't need a submit or review button. So there is no need to check the last checkbox. What you need to do for showing a Correct layer is set a trigger to open a layer when all items are dropped correctly as below:
Show layer Feedback when state of all items are dropped correctly.
- vijeyvijeyCommunity Member
Hi Chen,
Thanks for the guidance. I was able to achieve.
But 1 last clarification, if i wanted to have it in my own button and a review instead of the default submit button which is in the player, I need to disable the player button and add custom layer interactions as guided above.
is it correct.
Please advice.
Regards,
Vijey