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?




October 18, 2012 at 3:56 pm
The easiest way is to use <h2 class="[110]">
October 18, 2012 at 3:57 pm
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!
October 18, 2012 at 4:56 pm
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!
October 18, 2012 at 9:47 pm
Glad to help. Good luck!
Topic closed.