Changing image based on dropdown list selection
Good day.
I'm new to agilepoint and i need help with changing the image that is displayed in a single image in my form.
i.e. if a user selects option 1 from the dropdown list, then picture 1 must appear and if option 2 is selected, then picture 2 must appear.
can this be done using the rules for the form or must a javascript be used to do this, and if so please help.
Thanks
-
Hi Dominic,
You can achieve this by using rules exclusively for the dropdown control.
For example, if your dropdown has two options (Option 1 and Option 2) corresponding to Image 1 and Image 2 controls, you can create three rules:
- Rule 1: When the dropdown is set to Option 1, show Image 1 and hide Image 2.
- Rule 2: When the dropdown is set to Option 2, show Image 2 and hide Image 1.
- Rule 3: When the dropdown is empty, hide both Image 1 and Image 2.
-
Good morning Dhanush.
Thank you for your feedback.
I played with the rules and was able to get the image to react when an option is selected from the dropdown list. I tried calling images that I've uploaded into the image's database (see below)
But when I run the preview, the image changes with the error "Article Image is missing" (see below). How can I resolve this? I greatly appreciate any help.
-
Hello,
Is this happening with both your images, or just the one?
Also, here is more information regarding the image control: https://documentation.agilepoint.com/8000/appbuilder/cloudformImagePickerWin.html
Thanks,
Jason Wells
Please sign in to leave a comment.
Comments
3 comments