Style an output from dropdowns

I have a form that has a drop down menu to select whether a child is available for adoption or not when posting his/her profile. When I create the custom display, I would like to style “available” with a green button and “adopted” with a red button. I know how to write the style, but I’m not sure how to write the if/then statement or where to put it in my custom display.

Example:

If ID 110 is = available <h2 class=”available”>

If ID 1110 is = adopted <h2 class=”adopted”>

Is this possible?

The easiest way is to use <h2 class="[110]">

Angelo,

You would do the following:
[if 110 like="available"]<h2 class="available">[/if 110]
[if 110 like="adopted"]<h2 class="adopted">[/if 110]
You'd need to use like because of the select type field you're using. I didn't test, but it should work!

Thank you mutualdesigns! That's perfect! Here was my final code!

[if 111 like="Available"]<h2 class="available">[111]</h2>[/if 111]
[if 111 like="Adopted"]<h2 class="adopted">[111]</h2>[/if 111]

I could have done like Stephanie said and just used :

[if 111 like="Available"]<h2 class="[111]">[111]</h2>[/if 111]

But then if for some reason we edited the label, I'd have to remember to update my CSS.

I LOVE LOVE LOVE Formidable. I get so excited every time I use it! I'm so thankful for all the help as well. It helps unlock the power!

Glad to help. Good luck!

Topic closed.