Dynamically Display Images in Pages

Dynamically Display Images in Pages

Requirement

Dynamically display an image stored in the form in the Zoho Creator page.

Use Case

Imagine a Zoho Creator task management application employed to oversee tasks within an organization. Within the Dashboard page of this application, employees accessing the application will find their profile photo displayed based on their login email address. This provides a personalized and visually appealing user experience.

Steps to follow

  1. Create a form with the following details to record employee details.

    Form Name

    Form Link Name

    Field Type

    Field Name

    Fied Link Name

    Employee Details

    Employee_Details

    Name

    Employee Name

    Employee_Name

    Email

    Email

    Email

    Date

    Date of Birth

    Date_of_Birth

    Phone

    Phone

    Phone

    Address

    Address

    Address

    Single Line

    Employee ID

    Employee_ID

    Image

    Photo

    Photo

  2. Create a page named 'Dashboard' for the employees to view the tasks and its status upon accessing the application. Add required components according to your preferences. Refer to this link to view how to construct a dashboard for task management application as shown below.

  3. Drag and drop the HTML snippet into your Dashboard Page.

  4. Add the following script in the HTML snippet.
  1. <%{
  2. //Fetch the image URL of the employee photo uploaded in the Photo field of the Employee Details form with respect to the login user ID.
  3. image_link = Employee_Details[Email == zoho.loginuserid].Photo;
  4. //If the employee photo is fetched, replace the parameters in the fetched image URL.
  5. if(image_link!=null)
  6. {
  7. //Replace the parameters in the fetched image URL with the actual values using replaceAll() function.
  8. image_link = image_link.replaceAll("https://creatorexport.zoho.com/sharedBy/appLinkName/","https://creator.zoho.com" + zoho.appuri)
  9. image_link = image_link.replaceAll("viewLinkName","All_Employee_Details");
  10. image_link = image_link.replaceAll("fieldName","Photo");
  11. //Add the preferred HTML attributes at the end of the URL.
  12. image_link = image_link.replaceAll(">","width=\"140\" height=\"140\" style=\"display: flex; justify-content: center; align-items: center;\">");
  13. }
  14. //If the employee photo from the record is not fetched populate the snippet with default image.
  15. else
  16. {
  17. //Specify the public URL of the preferred image inside the <img> tag to display it as defauly when the record cannot be fetched.
  18. image_link = "<img src=\"https://desk.zoho.com/portal/api/kbCategory/4000000217879/logo/327583000026924010?orgId=4241905\" \"width=\"140\" height=\"140\" style=\"display: flex; justify-content: center; align-items: center;\">";
  19. }
  20. %>
  21. <%=image_link%>
  22. <%
  23. }%>

See How it Works


  1. Understand HTML snippets



        Create. Review. Publish.

        Write, edit, collaborate on, and publish documents to different content management platforms.

        Get Started Now


          Access your files securely from anywhere

            Zoho CRM Training Programs

            Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

            Zoho CRM Training
              Redefine the way you work
              with Zoho Workplace

                Zoho DataPrep Personalized Demo

                If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

                Zoho CRM Training

                  Create, share, and deliver

                  beautiful slides from anywhere.

                  Get Started Now


                    Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                    BOOK A SESSION







                                Quick LinksWorkflow AutomationData Collection
                                Web FormsEnterpriseOnline Data Collection Tool
                                Embeddable FormsBankingBegin Data Collection
                                Interactive FormsWorkplaceData Collection App
                                CRM FormsCustomer ServiceAccessible Forms
                                Digital FormsMarketingForms for Small Business
                                HTML FormsEducationForms for Enterprise
                                Contact FormsE-commerceForms for any business
                                Lead Generation FormsHealthcareForms for Startups
                                Wordpress FormsCustomer onboardingForms for Small Business
                                No Code FormsConstructionRSVP tool for holidays
                                Free FormsTravelFeatures for Order Forms
                                Prefill FormsNon-Profit

                                Intake FormsLegal
                                Mobile App
                                Form DesignerHR
                                Mobile Forms
                                Card FormsFoodOffline Forms
                                Assign FormsPhotographyMobile Forms Features
                                Translate FormsReal EstateKiosk in Mobile Forms
                                Electronic Forms
                                Drag & drop form builder

                                Notification Emails for FormsAlternativesSecurity & Compliance
                                Holiday FormsGoogle Forms alternative GDPR
                                Form to PDFJotform alternativeHIPAA Forms
                                Email FormsFormstack alternativeEncrypted Forms

                                Wufoo alternativeSecure Forms

                                TypeformWCAG


                                      All-in-one knowledge management and training platform for your employees and customers.

                                                Create. Review. Publish.

                                                Write, edit, collaborate on, and publish documents to different content management platforms.

                                                Get Started Now




                                                                  You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                                      Manage your brands on social media


                                                                        • Desk Community Learning Series


                                                                        • Digest


                                                                        • Functions


                                                                        • Meetups


                                                                        • Kbase


                                                                        • Resources


                                                                        • Glossary


                                                                        • Desk Marketplace


                                                                        • MVP Corner


                                                                        • Word of the Day


                                                                        • Ask the Experts


                                                                          Zoho Sheet Resources

                                                                           

                                                                              Zoho Forms Resources


                                                                                Secure your business
                                                                                communication with Zoho Mail


                                                                                Mail on the move with
                                                                                Zoho Mail mobile application

                                                                                  Stay on top of your schedule
                                                                                  at all times


                                                                                  Carry your calendar with you
                                                                                  Anytime, anywhere




                                                                                        Zoho Sign Resources

                                                                                          Sign, Paperless!

                                                                                          Sign and send business documents on the go!

                                                                                          Get Started Now




                                                                                                  Zoho TeamInbox Resources





                                                                                                            Zoho DataPrep Demo

                                                                                                            Get a personalized demo or POC

                                                                                                            REGISTER NOW


                                                                                                              Design. Discuss. Deliver.

                                                                                                              Create visually engaging stories with Zoho Show.

                                                                                                              Get Started Now








                                                                                                                                  • Related Articles

                                                                                                                                  • How to display images dynamically on a subform row based on the lookup field selection

                                                                                                                                    The images stored in a form can be retrieved and displayed dynamically within subforms. When users select a record from a lookup field in a subform row, relevant images associated with that record can appear in a designated rich text field within the ...
                                                                                                                                  • Understanding portal pages

                                                                                                                                    This help page is for Creator 6 users with portals created before June 1, 2026. For portals created later, refer to this document to learn about the latest version of portal page customization. If you are on Creator 5, refer to this document. Know ...
                                                                                                                                  • Customizing portal pages

                                                                                                                                    This help page is for Creator 6 users with portals created after June 1, 2026. For portals created earlier, refer to this document to learn about the older version of portal page customization. If you are on Creator 5, refer to this document. Know ...
                                                                                                                                  • Understanding panels

                                                                                                                                    In a nutshell Panels are visual containers embedded in pages and are used to display key information, such as dynamic metrics, statuses, and KPIs in a structured and visually appealing format. They help users grasp critical insights from the ...
                                                                                                                                  • Understanding portal pages

                                                                                                                                    This help page is for Creator 6 users with portals created after June 1, 2026. For portals created earlier, refer to this document to learn about the older version of portal page customization. If you are on Creator 5, refer to this document. Know ...
                                                                                                                                    Wherever you are is as good as
                                                                                                                                    your workplace

                                                                                                                                      Resources

                                                                                                                                      Videos

                                                                                                                                      Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                                      eBooks

                                                                                                                                      Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                                      Webinars

                                                                                                                                      Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                                      CRM Tips

                                                                                                                                      Make the most of Zoho CRM with these useful tips.



                                                                                                                                        Zoho Show Resources