Support

Account

Home Forums General Issues Conditional Fields – Color or Image – Add Via Dynamic Style Sheet Reply To: Conditional Fields – Color or Image – Add Via Dynamic Style Sheet

  • Hi John,

    1) Create a radio field. Give it a few values. For this example, set the field name to ‘my_radio’
    2) Save the fieldset (shouldn’t be needed but just in case)
    3) Create an image field
    4) At the bottom, set Conditional Logic to “Yes”
    5) In the dropdowns, select “my_radio” then “is equal to” and the last box should show a list of the options you entered into the radio field.

    Getting the field info up to the body element is going to be tricky because of how/where you position the loop. Instead of using inline styles you could create a javascript block that adds that $style line to the body element. Something like jQuery('body').css('background-color', <?php echo $color; ?>); where the css line would change depending on the conditional check in my first reply.

    No idea how to do the dynamic style sheet thing. 🙂