2 Replies Latest reply on Aug 17, 2012 5:50 AM by manjeete

    How do I use a radio button to enable a background image?

    saskiahope

      Good morning,

       

      I have a two part question. I have a radio button on my form that I would like to behave as follows: if it is set to "Yes", a background image should appear on the form.

       

      1. What is the best way to insert a background image into my form?

       

      2. How do I enable the behavior such that if the Yes radio button is selected, the background image appears but if the No radio button is selected then it doesn't appear.

       

      Thank you in advance for your help.

        • 1. Re: How do I use a radio button to enable a background image?
          steve_foxall Level 2

          Maybe I'm over simplifying (not being an expert user myself), but don't you just create an image field on the master page and use the Action Builder to construct javascripts to make the field visible or hidden when the button field is checked and unchecked?

           

          Having said that, I just tried it and although the actions are there it doesn't seem to function....

          • 2. Re: How do I use a radio button to enable a background image?
            manjeete Level 1

            Hi,

             

            Before designing the form you just select an image field and insert into your page. Then add an image which will be your background image.

             

            Now, go to the object pallete,select Field Tab and go to the Presence section and select the presence as hidden. This means initially there will not be any images whenever user will open the form.

             

            Now, in the click event of radio button just write the below code.

             

            For Yes,

             

            ImageField.presence = visible;

             

            For No,

             

            ImageField.presence = hidden;

             

            Regards,

            Manjeet