Condition to change the background of the form

  • natupote
    Asked on June 20, 2016 at 6:08 PM

    Hello peoples and sorry my english

    Is possible use the conditions to change the background image of my form?

     

    Thanks for read

  • jonathan
    Replied on June 20, 2016 at 8:24 PM

    This can be achieved by using multiple page form and using the form source code. 

    You can review this discussion thread for similar solution.

    How-To-Dynamically-Change-Background-Image-of-Form-Per-Page

    Hope this help. Let us know if you need further assistance.

     

  • irshadahmad84
    Replied on June 20, 2016 at 8:36 PM

     

    Yes, it is possible to change the Background image of the Form. I have created a custom Form with different Background image. Please check that custom Form on below URL:

    https://form.jotform.me/61664410408451

     

    Below are the steps for changing the Background image of Form:

    1. Need to click on the Preferences button.

    Condition to change the background of the form Image 1 Screenshot 30

    2. After clicking on the Preferences button, you need to go on "FORM STYLES -> CUSTOM CSS". In the custom css form box you need to inject the below css code:

    .form-all {

    background: url(https://www.jotform.com/images/themes/tile-black.jpg) repeat scroll 0 0;

    }

    And please remember to replace the background imge URL, with the background image URL of your own.Condition to change the background of the form Image 2 Screenshot 41

    Please try it, and let me know if you have any query.

  • natupote
    Replied on June 20, 2016 at 10:00 PM

    Hello

    I read the solution made by abajan, but i don`t understand how he put that script in the form, can you teach me?

  • jonathan
    Replied on June 20, 2016 at 10:17 PM

    Hi,

    For the solution of Abajan to work similar to what you need, you will need the following:

    #1. Your own website page where you can use the source code of the form.

    In Abajan's solution, this is the website page 

    #2 Source code embed of your form 

    #3 The custom javascript will be added to your website page.

    In Abajan's solution, this was the custom script.

    Do you have your own hosted website page? This is the main component for the solution to work.

    You can test the example solution in Abajan's page here.

    Let us know how we can be of further assistance.

     

    ---

    @ irshadahmad84

    Thank you for trying to help also. But I test your form https://form.jotform.me/61664410408451 and unfortunately the background is not changing the way you described it on your solution.

    Condition to change the background of the form Image 1 Screenshot 20

     

     

     

     

  • natupote
    Replied on June 21, 2016 at 11:44 AM

    Thanks, thats help me

    But i need change the background depending to the radiobutton selection

    for example, depending of the option selected in the radiobutton, the background changes 

    option 1 -> background 1

    option 2 -> background 2

    option 3 -> background 3

     

    Thanks!!

  • BJoanna
    Replied on June 21, 2016 at 12:51 PM

    Like mentioned by my colleague you will need to get full source code of your form and then to embed your form to your webpage. Then you will need to add javascript code to change form background based on selected radio button option. You can try to use javascript code provided by my colleagues on this thread: https://www.jotform.com/answers/496429